
已安装html-webpack-plugin但仍出现错误:Error: Cannot find module html-w...
5星
- 浏览量: 0
- 大小:None
- 文件类型:None
简介:
遇到使用html-webpack-plugin时出现Cannot find module html-webpack-plugin的问题,可能是因为webpack配置文件中的插件路径设置不正确或模块未被正确安装。确保已通过npm或yarn全局安装了html-webpack-plugin,并在webpack配置中正确引入和使用它。检查package.json文件以确认所有依赖项均已列出并安装。
之前项目目录运行一切正常。后来新建了build文件夹,并将webpack.config.js移动到了这个新文件夹里。在package.json中的scripts配置如下:
```
scripts: {
test: echo \\Error: no test specified\\ && exit 1,
start: node ./src/koa.js,
build: webpack --config ./build/webpack.config.js
}
```
配置完成后,运行`npm run build`时出现了错误。
全部评论 (0)
还没有任何评论哟~


