Building REACT Project Error Message (Entrypoint html-webpack-plugin for "index.html" = index.html)

Viewed 236

I'm unable to build my react project using npm run build as I keep getting the error message below:

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. What I've tried already:

  1. I've tried changing the entry point by following this html-webpack-plugin Entrypoint undefined = index.html but it still hasn't worked.

  2. I've attempted downgrading webpack to 3.07 as well but that solution didn't help either.

  3. 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

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

My index.html is located in the root folder

In my package.json, I have webpack as follows:

"devDependencies": {
 "html-webpack-plugin": "3.0.7",
...
}

I'd totally appreciate help to help resolve this issue. Thanks in advance everyone.

1 Answers

npm run build will work only if you specify what needs to be done for build in the package.json file. but if your intension is just to install packages(i.e. first step) run "npm install" and to run the code run "npm start"

Related