1、Error: Cannot find module 'webpack'
解决方式:
npm install --save-dev webpack
2、Error: Rule can only have one resource source (provided resource and test + include + exclude) in {
解决方式:
首先卸载原来的webpack包:npm uninstall webpack 然后重新再项目中安装低版本的:npm install webpack@^4.0.0 --save-dev
3、Syntax Error: Error: Cannot find module '@vue/babel-preset-app'
npm install @vue/babel-preset-app --save-dev npm install --save-dev @babel/core
4、Syntax Error: Error: Cannot find module 'cache-loader'
5、解决Error: ENOENT: no such file or directory, scandir 'xxx\node-sass\vendor'
删除依赖,重新 cnpm install
6、解决 These dependencies were not found: * core-js/modules/es6.array.fill in xxx 之类的问题
在babel.config.js中添加: presets: [ [ "@vue/app", { useBuiltIns: "entry" } ] ]
Error: Rule can only have one resource source (provided resource and test + include + exclude)
解决方案:
删除webpack,重新装以前的版本。
npm uninstall webpack npm install webpack@^4.0.0 --save-dev