我无法使用npm run build构建我的react项目,因为我一直收到下面的错误消息:
Child __offline_serviceworker:
1 asset
Entrypoint __offline_serviceworker = __offline_serviceworker
Child html-webpack-plugin for "index.html":
1 asset
Entrypoint html-webpack-plugin for "index.html" = index.html如果这是一个业余的问题,我对建立反应项目相当陌生,所以很抱歉。我已经尝试过的:
3.07,但这个解决方案也没有帮助。--npm i mishoo/UglifyJS2#harmony,如这里所指出的:https://github.com/webpack/webpack-pwa/issues/7,但仍然没有运气目前我想不出任何其他的解决方案,所以我决定在这里发布。
我的webpack位于:internals/webpack/webpack.prod.babel
我的index.html位于根文件夹中
在我的package.json中,webpack如下:
"devDependencies": {
"html-webpack-plugin": "3.0.7",
...
}我非常感谢帮助解决这个问题。提前谢谢各位。
发布于 2021-11-12 16:25:46
只有当您指定在package.json文件中构建所需做的事情时,package.json才能工作。但是,如果您的目的只是安装软件包(即第一步),运行"npm install“并运行代码,运行"npm start”
https://stackoverflow.com/questions/69945094
复制相似问题