vue中node_modules引入问题
之前写好的一个项目,一段时间后准备写一些新的功能,发现npm run dev 报错, Error: Cannot find module 'array-includes' 找不到,遂在网上寻求解决办法,都说是删掉、清缓存、重装依赖三部曲,因为网络条件不好都是用的是淘宝镜像,重新安装后报 Error: EBUSY: resource busy or locked, lstat 'C:\pagefile.sys' 也找了路径没错、资源也没占用、重装也不好使。刚毕业的菜鸟,恳请大佬们帮我解惑!下面是俩次的详细报错信息和我的项目地址(https://github.com/gengjie88/msh)
第一次----------
msh@1.0.0 dev
webpack-dev-server --inline --progress --config build/webpack.dev.conf.js
node:internal/modules/cjs/loader:936
throw err;
^
Error: Cannot find module 'array-includes'
Require stack:
- C:\Users\Administrator\Desktop\project\msh\node_modules\_webpack-dev-server@2.11.5@webpack-dev-server\lib\polyfills.js
- C:\Users\Administrator\Desktop\project\msh\node_modules\_webpack-dev-server@2.11.5@webpack-dev-server\bin\webpack-dev-server.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (C:\Users\Administrator\Desktop\project\msh\node_modules\_webpack-dev-server@2.11.5@webpack-dev-server\lib\polyfills.js:6:18)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'C:\Users\Administrator\Desktop\project\msh\node_modules\_webpack-dev-server@2.11.5@webpack-dev-server\lib\polyfills.js',
'C:\Users\Administrator\Desktop\project\msh\node_modules\_webpack-dev-server@2.11.5@webpack-dev-server\bin\webpack-dev-server.js'
]
}
第二次----------
These dependencies were not found:
- element-ui/lib/theme-chalk/index.css in ./src/main.js
- !!vue-style-loader!css-loader?{"sourceMap":true}!../../node_modules/_vue-loader@13.7.3@vue-loader/lib/style-compiler/index?{"vue":true,"id":"data-v-7d6050a4","scoped":true,"hasInlineConfig":false}!px2rem-loader?{"remUnit":192}!../../node_modules/_vue-loader@13.7.3@vue-loader/lib/selector?type=styles&index=0!./Childpage.vue in ./src/page/Childpage.vue
- !!vue-style-loader!css-loader?{"sourceMap":true}!../../node_modules/_vue-loader@13.7.3@vue-loader/lib/style-compiler/index?{"vue":true,"id":"data-v-9342ccf6","scoped":true,"hasInlineConfig":false}!px2rem-loader?{"remUnit":192}!../../node_modules/_vue-loader@13.7.3@vue-loader/lib/selector?type=styles&index=0!./Homepage.vue in ./src/page/Homepage.vue
- vuex in ./node_modules/_babel-loader@7.1.5@babel-loader/lib!./node_modules/_vue-loader@13.7.3@vue-loader/lib/selector.js?type=script&index=0!./src/page/Childpage.vue, ./node_modules/_babel-loader@7.1.5@babel-loader/lib!./node_modules/_vue-loader@13.7.3@vue-loader/lib/selector.js?type=script&index=0!./src/page/Homepage.vue and 1 other
To install them, you can run: npm install --save element-ui/lib/theme-chalk/index.css !!vue-style-loader!css-loader?{"sourceMap":true}!../../node_modules/_vue-loader@13.7.3@vue-loader/lib/style-compiler/index?{"vue":true,"id":"data-v-7d6050a4","scoped":true,"hasInlineConfig":false}!px2rem-loader?{"remUnit":192}!../../node_modules/_vue-loader@13.7.3@vue-loader/lib/selector?type=styles&index=0!./Childpage.vue !!vue-style-loader!css-loader?{"sourceMap":true}!../../node_modules/_vue-loader@13.7.3@vue-loader/lib/style-compiler/index?{"vue":true,"id":"data-v-9342ccf6","scoped":true,"hasInlineConfig":false}!px2rem-loader?{"remUnit":192}!../../node_modules/_vue-loader@13.7.3@vue-loader/lib/selector?type=styles&index=0!./Homepage.vue vuex
These relative modules were not found:
- ./assets/style/reset.css in ./src/main.js
../src/assets/style/Childpage.css in ./src/main.js Error from chokidar (C:): Error: EBUSY: resource busy or locked, lstat 'C:\pagefile.sys'
node:internal/process/promises:246triggerUncaughtException(err, true /* fromPromise */);
^
[Error: ENOENT: no such file or directory, stat 'C:\Users\Administrator\Desktop\project\node_modules\accepts'] {
errno: -4058,
code: 'ENOENT',
syscall: 'stat',
path: 'C:\Users\Administrator\Desktop\project\node_modules\accepts'
}
以上是 vue中node_modules引入问题 的全部内容, 来源链接: utcz.com/p/936754.html