Sunday, June 2, 2024
 Popular · Latest · Hot · Upcoming
21
rated 0 times [  24] [ 3]  / answers: 1 / hits: 19795  / 4 Years ago, sat, november 28, 2020, 12:00:00

I just created a react app, it was working fine but once I restart the editor it is throwing error like this :


        Poojas-MacBook-Air:newreact pooja$ npm start
npm ERR! path /Users/pooja/Desktop/projects/newreact/package.json
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open
'/Users/pooja/Desktop/projects/newreact/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/pooja/.npm/_logs/2020-11-28T10_27_42_118Z-debug.log

Please help if anyone knows about it.


More From » reactjs

 Answers
2

  1. Make sure you have the latest npm (npm install -g npm).

  2. Add an exception to your antivirus to ignore the node_modules folder in your project.

  3. rm -rf node_modules package-lock.json

  4. npm install


[#50517] Sunday, November 15, 2020, 4 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
danar

Total Points: 271
Total Questions: 94
Total Answers: 93

Location: Ecuador
Member since Thu, Jun 4, 2020
4 Years ago
;