[英]Building REACT Project Error Message (Entrypoint html-webpack-plugin for "index.html" = index.html)
I'm unable to build my react project using npm run build
as I keep getting the error message below:我无法使用
npm run build
构建我的npm run build
项目,因为我不断收到以下错误消息:
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
I'm fairly new to building react projects so apologies if this is an amateur question.我对构建 React 项目还很陌生,如果这是一个业余问题,我深表歉意。 What I've tried already:
我已经尝试过的:
I've tried changing the entry point by following this html-webpack-plugin Entrypoint undefined = index.html but it still hasn't worked.我已经尝试按照这个html-webpack-plugin Entrypoint undefined = index.html更改入口点,但它仍然没有工作。
I've attempted downgrading webpack to 3.07
as well but that solution didn't help either.我也尝试将 webpack 降级到
3.07
,但该解决方案也无济于事。
I've tried other options including npm i mishoo/UglifyJS2#harmony
in terminal as pointed out here: https://github.com/webpack/webpack-pwa/issues/7 but still no luck我已经尝试了其他选项,包括
npm i mishoo/UglifyJS2#harmony
在终端中指出: https : //github.com/webpack/webpack-pwa/issues/7但仍然没有运气
I currently can't think of any other solution thus I decided to post here.我目前想不出任何其他解决方案,因此我决定在这里发布。
My webpack is located in: internals/webpack/webpack.prod.babel
我的 webpack 位于:
internals/webpack/webpack.prod.babel
My index.html
is located in the root folder我的
index.html
位于根文件夹中
In my package.json, I have webpack as follows:在我的 package.json 中,我有 webpack 如下:
"devDependencies": {
"html-webpack-plugin": "3.0.7",
...
}
I'd totally appreciate help to help resolve this issue.我非常感谢帮助解决这个问题。 Thanks in advance everyone.
提前谢谢大家。
npm run build
will work only if you specify what needs to be done for build in the package.json file.只有当您在 package.json 文件中指定构建所需的内容时,
npm run build
才会起作用。 but if your intension is just to install packages(ie first step) run " npm install
" and to run the code run " npm start
"但是如果您的意图只是安装软件包(即第一步),请运行“
npm install
”并运行代码运行“ npm start
”
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.