problem
solve
There are 2 methods, it is recommended to try the first one first, but not the second one
Reinstall the dependent environment
Delete the project node_modules
folder and execute again
# 安装依赖环境
npm install
# 运行
npm run dev
Lower the version of webpack
Check package.json
the webpack
relevant version
# 卸载当前版本
npm uninstall webpack-dev-server
npm uninstall webpack
# 安装低版本
npm install [email protected] --save-dev
npm install [email protected] --save-dev
# 运行
npm run dev
If the execution
npm uninstall webpack-dev-server
also reports an error, you can only use the following method.
The reason isnode_modules
that the folder has been accidentally changed, resulting in incomplete dependent libraries.
solve:
- Delete under the project
node_modules
- Re-execute in the project directory
npm install
, it will regeneratenode_modules
- carried out
npm run build
- carried out
npm run dev