1

i have a small question, I am working on a React.js and Node.js project, my project was working fine until I downloaded npm install atomic-layout --save

My command: npm start (use to work before the download)

I am getting this error:

react-scripts start

sh: react-scripts: command not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! client@0.1.0 start: `react-scripts start`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the client@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

My question is the following: Is this linked to the download of the npm install atomic-layout --save? Should I uninstall this npm package?

Thank you in advance for your answer

Vinil Prabhu
  • 1,279
  • 1
  • 10
  • 22

2 Answers2

2

Try the following,

  • Delete the package-lock.json file
  • Delete the node_modules folder completely.
  • Do a fresh npm install

Hope this helps!

David R
  • 14,711
  • 7
  • 54
  • 72
1

I guess you are using react-create-app. It shouldn't be a problem that you install any other library on the top of that, but it seems like the react-scripts dependency has been removed from your package.json, can you check that it's still there?

Otherwise, reinstall the npm dependencies with npm install. If react-scripts was removed, then run npm install react-scripts --save to reinstall it and save it in the dependencies again.

Juan Rivas
  • 585
  • 1
  • 3
  • 17