I'm trying to migrate a project from Vue2 to Nuxt3, mostly because of SEO problems, and when I try to nom run dev it, I get these errors :
These dependencies were not found:
child_process in ../node_modules/xmlhttprequest/lib/XMLHttpRequest.js
fs in ../node_modules/xmlhttprequest/lib/XMLHttpRequest.js
This is my package.json :
{
"name": "project-name",
"version": "1.0.0",
"private": true,
"scripts": {
"dev": "nuxt",
"build": "nuxt build",
"start": "nuxt start",
"generate": "nuxt generate"
},
"dependencies": {
"core-js": "^3.25.3",
"nuxt": "^2.15.8",
"v-owl-carousel": "^1.0.8",
"vmodal": "^0.1.13",
"vue": "^2.7.10",
"vue-server-renderer": "^2.7.10",
"vue-template-compiler": "^2.7.10",
"vuelidate": "^0.7.7"
},
"devDependencies": {
"@iconify/vue2": "^2.0.0"
}
}
I'm working with legacy code I haven't built from scratch and don't know where child_process or fs are used, how can I find them and stop this problem from happening ?
It's also weird to me that none of my modules appear in the package.0json
CodePudding user response:
Have you installed the dependency it's asking for?
npm i xmlhttprequest
CodePudding user response:
Figured out the problem, it came from me using Parse. Requiring parse instead node/parse fixed it for now but I suspect there will be other problems relating to that later down the lane.