React app not Building shows code ELIFECYCLE

Viewed 1833

This error is shown whenever i try to build the project. Can someone please help me with this

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! covid-19-world@0.1.0 build: react-scripts build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the covid-19-world@0.1.0 build 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! C:\Users\uniqf\AppData\Roaming\npm-cache_logs\2020-09-02T16_41_30_577Z-debug.log The terminal process "C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -Command npm run build" terminated with exit code: 1.

2 Answers

You can try the following -

  • Delete the node_modules folder
  • Delete the package-lock.json if it exists
  • run npm install in the terminal

Yes I found the problem and solved it by removing the cache, Doing what SFUE said above and created a new project with all the source code of earlier and I was able to build the project

Related