If you package according to the separated version of Vue, you will get an error Cannot find module 'html-webpack-plugin'

1. Error log: Cannot find module 'html-webpack-plugin'

 

2. Solution:

 1. Manually delete the node_modules directory

 

 

  2. Reinstall dependencies: npm install --registry=https://registry.npm.taobao.org 

npm install --registry=https://registry.npm.taobao.org

 

 

3. Install missing dependencies: npm i html-webpack-plugin --save-dev --legacy-peer-deps

npm i html-webpack-plugin --save-dev --legacy-peer-deps

 

 

4. Repackage npm run build:prod

npm run build:prod

 

 After the packaging is complete, it can be deployed to the server.

Guess you like

Origin blog.csdn.net/weixin_51906670/article/details/130322940
Recommended