好久没用得项目在npm run dev 启动的时候报错了
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! agency@1.0.0 dev: `webpack-dev-server --inline --progress --config buil d/webpack.dev.conf.js`
尝试了网上说的重新安装webpack-dev-server的办法,降低版本和vue版本保持一致的办法,都没解决
最后我重新安装了一下同版本的webpack-dev-server,这个报错解决了,但是紧接着又有其他一堆报错
> agency@1.0.0 dev D:\maixun\agency
> webpack-dev-server --inline --progress --config build/webpack.dev.conf.js
94% asset optimization
ERROR Failed to compile with 26 errors 18:30:34
error in ./src/pages/RelationBrands.vue
Module build failed: Error: ENOENT: no such file or directory, scandir 'D:\maixun\agency\node_modules\node-sass\vendor'
at Object.fs.readdirSync (fs.js:904:18)
at Object.getInstalledBinaries (D:\maixun\agency\node_modules\node-sass\lib\extensions.js:129:13)
at foundBinariesList (D:\maixun\agency\node_modules\node-sass\lib\errors.js:20:15)
at foundBinaries (D:\maixun\agency\node_modules\node-sass\lib\errors.js:15:5)
at Object.module.exports.missingBinary (D:\maixun\agency\node_modules\node-sass\lib\errors.js:45:5)
at module.exports (D:\maixun\agency\node_modules\node-sass\lib\binding.js:15:30)
at Object.<anonymous> (D:\maixun\agency\node_modules\node-sass\lib\index.js:14:35)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.sassLoader (D:\maixun\agency\node_modules\sass-loader\lib\loader.js:46:72)
很多很多个文件的错误
解决办法,卸载 node-moduels,重新安装它
npm install