1

Get a bunch of errors when trying to run "npm start" after running "create-react-app my-app" in the terminal. It seems to involve a packages.json file but I've completely uninstalled node.js and installed it again and still run into the same problem. The error:

npm ERR! syscall open
npm ERR! path /Users/marcel/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/Users/marcel/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/marcel/.npm/_logs/2020-07-15T01_33_47_980ZMarcelMarcels-MacBook-PrMarcels-MacBook

1 Answers1

0

You need to enter the directory of your React app, which will have a packag.json in it, before using npm.

Example

npx create-react-app my-app
cd my-app
npm start
Nick McCurdy
  • 17,658
  • 5
  • 50
  • 82