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
You need to enter the directory of your React app, which will have a packag.json
in it, before using npm
.
npx create-react-app my-app
cd my-app
npm start
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.