I have been working on this React project, since a few months without having come across this error. I haven't made any changes in the location of the index.html file in the project tree, which is why I can't explain this error.
I have tried the following measures without success:
- changing the location of public folder
- changing the location of contents of public folder
- changing the location of package-lock.json
- changing the location of package.json
- npm install
- npm install react-scripts --save
Please find the error displayed in the terminal:
Could not find a required file.
Name: index.html
Searched in: /Users/Sujay/Documents/Documents/Learn Web Development the Hard Way/lacapsule/project/Dark Sky Map Bitbucket/darkskymap_frontend/public
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! frontend@0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the frontend@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/Sujay/.npm/_logs/2019-08-06T07_12_22_366Z-debug.log
Expected result : React project should launch without any issue.
Actual result: Error message in terminal mentioned above.
See Question&Answers more detail:os