When i run npm run serve , this error is keep coming up.
Error: Cannot find module './editor-info/linux'
Require stack:
- C:\Users\LENOVO\Desktop\covidcare-ytu-clinic\node_modules\launch-editor\guess.js
- C:\Users\LENOVO\Desktop\covidcare-ytu-clinic\node_modules\launch-editor\index.js
- C:\Users\LENOVO\Desktop\covidcare-ytu-clinic\node_modules\@vue\cli-shared-utils\lib\launch.js
- C:\Users\LENOVO\Desktop\covidcare-ytu-clinic\node_modules\@vue\cli-shared-utils\index.js
- C:\Users\LENOVO\Desktop\covidcare-ytu-clinic\node_modules\@vue\cli-service\bin\vue-cli-service.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:889:15)
at Function.Module._load (internal/modules/cjs/loader.js:745:27)
at Module.require (internal/modules/cjs/loader.js:961:19)
at require (internal/modules/cjs/helpers.js:92:18)
at Object.<anonymous> (C:\Users\LENOVO\Desktop\covidcare-ytu-clinic\node_modules\launch-editor\guess.js:9:30)
at Module._compile (internal/modules/cjs/loader.js:1072:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
at Module.load (internal/modules/cjs/loader.js:937:32)
at Function.Module._load (internal/modules/cjs/loader.js:778:12)
at Module.require (internal/modules/cjs/loader.js:961:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'C:\\Users\\LENOVO\\Desktop\\covidcare-ytu-clinic\\node_modules\\launch-editor\\guess.js',
'C:\\Users\\LENOVO\\Desktop\\covidcare-ytu-clinic\\node_modules\\launch-editor\\index.js',
'C:\\Users\\LENOVO\\Desktop\\covidcare-ytu-clinic\\node_modules\\@vue\\cli-shared-utils\\lib\\launch.js',
'C:\\Users\\LENOVO\\Desktop\\covidcare-ytu-clinic\\node_modules\\@vue\\cli-shared-utils\\index.js',
'C:\\Users\\LENOVO\\Desktop\\covidcare-ytu-clinic\\node_modules\\@vue\\cli-service\\bin\\vue-cli-service.js'
]
}
npm update
but this error keep coming up .I am new to vue project and this bugs is breaking my patient....Please someone save me.
here is my package.json
{ "name": "covidcare-ytu", "version": "0.1.0", "private": true, "scripts": { "serve": "vue-cli-service serve", "build": "vue-cli-service build", "test:unit": "vue-cli-service test:unit", "lint": "vue-cli-service lint" }, "dependencies": { "@vuelidate/core": "^2.0.0-alpha.26", "@vuelidate/validators": "^2.0.0-alpha.22", "axios": "^0.21.4", "chart.js": "^3.5.1", "core-js": "^3.6.5", "es-abstract": "^1.18.6", "firebase": "^9.0.0", "nprogress": "^0.2.0", "primeflex": "^2.0.0", "primeicons": "^4.1.0", "primevue": "^3.7.0", "prismjs": "^1.24.1", "uuid": "^8.3.2", "vue": "^3.2.6", "vue-axios": "^3.3.7", "vue-router": "^4.0.0-0", "vuex": "^4.0.0-0" }, "devDependencies": { "@vue/cli-plugin-babel": "~4.5.0", "@vue/cli-plugin-eslint": "^3.1.1", "@vue/cli-plugin-router": "~4.5.0", "@vue/cli-plugin-unit-jest": "^4.5.13", "@vue/cli-plugin-vuex": "~4.5.0", "@vue/cli-service": "^4.5.13", "@vue/compiler-sfc": "^3.0.0", "@vue/eslint-config-prettier": "^6.0.0", "@vue/test-utils": "^2.0.0-0", "babel-eslint": "^10.1.0", "eslint": "^6.7.2", "eslint-plugin-prettier": "^3.3.1", "eslint-plugin-vue": "^7.0.0", "prettier": "^2.2.1", "sass": "^1.26.5", "sass-loader": "^8.0.2", "typescript": "~3.9.3", "vue-jest": "^5.0.0-0" } }
Here is babel.config.js
module.exports = { presets: ['@vue/cli-plugin-babel/preset'], }
CodePudding user response:
Then is because somewhere you have libraries that require or have Linux dependencies, I recommend to you create a backup of your package.json and remove "@vue-cli" with this:
npm uninstall @vue/cli
And then install it again:
npm install -g @vue/cli
Other solution can try is to update your npm with the following:
npm install npm@latest -g
Then delete the folder "node-modules" to clean all libraries that you have installed on your project and then install with the following:
npm install