index.html missing from build
See original GitHub issueDescribe the bug
After running the build, the index.html is missing from the /build folder.
Did you try recovering your dependencies?
Yes I did.
I followed these steps:
- Delete node_modules folder
- Remove package-lock.json
- npm install -g npm@latest
- npm install
C:\ws\dvoms>npm install -g npm@latest
C:\Users\stijn\AppData\Roaming\npm\npx -> C:\Users\stijn\AppData\Roaming\npm\node_modules\npm\bin\npx-cli.js
C:\Users\stijn\AppData\Roaming\npm\npm -> C:\Users\stijn\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js
+ npm@6.14.8
added 434 packages from 885 contributors in 26.111s
C:\ws\dvoms>npm install
npm WARN deprecated @types/testing-library__dom@7.5.0: This is a stub types definition. testing-library__dom provides its own type definitions, so you do not need this installed.
npm WARN deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated @hapi/joi@15.1.1: joi is leaving the @hapi organization and moving back to 'joi' (https://github.com/sideway/joi/issues/2411)
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated @hapi/bourne@1.3.2: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/address@2.1.4: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/topo@3.1.6: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated left-pad@1.3.0: use String.prototype.padStart()
npm WARN deprecated core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
> core-js@2.6.11 postinstall C:\ws\dvoms\node_modules\babel-runtime\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"
Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
> https://opencollective.com/core-js
> https://www.patreon.com/zloirock
Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
> core-js@3.6.5 postinstall C:\ws\dvoms\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"
> core-js-pure@3.6.5 postinstall C:\ws\dvoms\node_modules\core-js-pure
> node -e "try{require('./postinstall')}catch(e){}"
> protobufjs@6.10.1 postinstall C:\ws\dvoms\node_modules\protobufjs
> node scripts/postinstall
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules\react-scripts\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules\jest-haste-map\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN notsup Unsupported engine for watchpack-chokidar2@2.0.0: wanted: {"node":"<8.10.0"} (current: {"node":"10.16.3","npm":"6.14.8"})
npm WARN notsup Not compatible with your version of node/npm: watchpack-chokidar2@2.0.0
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules\watchpack-chokidar2\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules\webpack-dev-server\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN @tensorflow/tfjs-automl@1.0.0 requires a peer of @tensorflow/tfjs-converter@~1.2.8 but none is installed. You must install peer dependencies yourself.
npm WARN @tensorflow/tfjs-automl@1.0.0 requires a peer of @tensorflow/tfjs-core@~1.2.8 but none is installed. You must install peer dependencies yourself.
npm WARN sass-loader@8.0.2 requires a peer of node-sass@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN sass-loader@8.0.2 requires a peer of sass@^1.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN sass-loader@8.0.2 requires a peer of fibers@>= 3.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN tsutils@3.17.1 requires a peer of typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta but none is installed. You must install peer dependencies yourself.
added 2048 packages from 859 contributors and audited 2054 packages in 425.852s
79 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
C:\ws\dvoms>npm --version
6.14.8
Steps to reproduce
Run npm run build
, then check whether index.html was generated successfully.
Expected behavior
It builds all project files, including index.html
Actual behavior
index.html is missing
C:\ws\dvoms>npm run build
> dvoms@0.5.0 build C:\ws\dvoms
> react-scripts build
Creating an optimized production build...
Compiled successfully.
File sizes after gzip:
The project was built assuming it is hosted at /.
You can control this with the homepage field in your package.json.
The build folder is ready to be deployed.
You may serve it with a static server:
npm install -g serve
serve -s build
Find out more about deployment here:
bit.ly/CRA-deploy
C:\ws\dvoms>dir .\build\index.html
Volume in drive C is SSD
Volume Serial Number is 6A90-767E
Directory of C:\ws\dvoms\build
File Not Found
Reproducible demo
Sorry I cannot provide this. Initially, run build worked as expected but it broke. I have not ejected and did not change anything about the build scripting afaik.
Related issue
Production Build Randomly Fails #1082
This issue describes exactly what I am seeing but was closed and locked. EDIT: Ok, maybe not exactly. The OP of that issues says it works sometimes, but for me it is consistently failing now.
Issue Analytics
- State:
- Created 3 years ago
- Comments:13
Top Results From Across the Web
reactjs create-react-app missing index.html in src folder
After I make a build via npm run build , index.html is generated in build folder. I created one manually in src folder,...
Read more >Index.html not found - Render community
Hello community, I was trying to deploy my MERN based E-commerce website on render.com, after the render terminal shows the build was ...
Read more >I still see "Page Not Found" Even though I have an index.html file
Hi I am having the common issue where I see “Page Not Found” after deployment. I looked at the [Common Issue] post but...
Read more >The "Index html generation failed property missing ':'" error ...
The "Index html generation failed property missing ':'" error appears for a custom theme in Angular 12 · Run npm install · Run...
Read more >Using the Public Folder - Create React App
Instead it will be copied into the build folder untouched. To reference assets in the ... Inside index.html , you can use it...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok I found the culprit. I ignored yall’s warnings about not using webpack import syntax. I added a comment to disable the lint rule in the one file I needed to import a worker. Got that idea from here: https://github.com/developit/workerize-loader/issues/5 This worked great in development but caused the build to fail silently. So… my bad I guess.
However, I still think the build should actually fail instead of just not generating any output.
Yes, the production build is successfully built when using this workaround.