Cannot find module 'html-webpack-plugin'
时间: 2023-09-22 15:10:24 浏览: 225
手动解决Cannot find module '@sentry/webpack-plugin'等问题
5星 · 资源好评率100%
在执行npm run build命令时,出现了Cannot find module 'html-webpack-plugin'的错误。解决这个问题的方法是重新安装html-webpack-plugin模块。首先,你可以尝试通过运行npm i html-webpack-plugin --save-dev命令来重新安装该模块。如果这个方法不起作用,你可以尝试手动删除node_modules目录,并重新安装依赖,使用以下命令:npm install --registry=https://registry.npm.taobao.org,然后安装缺少的依赖:npm i html-webpack-plugin --save-dev --legacy-peer-deps。最后,重新运行npm run build:prod命令进行打包。这样,问题就应该得到解决了,你可以继续部署到服务器了。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [Cannot find module ‘html-webpack-plugin](https://blog.csdn.net/s_156/article/details/128131532)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [Error: Cannot find module ‘html-webpack-plugin](https://blog.csdn.net/weixin_44177244/article/details/125638883)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [若依Vue分离版打包报错Cannot find module ‘html-webpack-plugin](https://blog.csdn.net/weixin_51906670/article/details/130322940)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文