0
votes

When running npm start, to start a react project I get the following messages on the terminal:

npm ERR! code ENOENT npm ERR! syscall open npm ERR! path /Users/eraldomaia/package.json npm ERR! errno -2 npm ERR! enoent ENOENT: no such file or directory, open '/Users/eraldomaia/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/eraldomaia/.npm/_logs/2020-02-29T15_23_08_741Z-debug.log

I do not know what to do!

How can I solve this?

2
It seems like you trying to run the project from the different folder, in your case iti s Home folder. You need to run it from the folder where you have bootstrapped or pulled your project.Sergii Vorobei
this happened to me several times in vscode when I opened terminal with ctrl+~. You need open the terminal/npm start from root folderPrakash Reddy Potlapadu

2 Answers

0
votes

This is because npm is unable to find package.json in the directory where you are running npm start. Make sure your current working directory is the one where the project is actually cloned / bootstrapped.

0
votes

You have to run npm start at root folder of your project (where de package.json resides).