Reputation: 361
I donwload a project form somewhere , and I run 'npm install' , I got this:
npm ERR! path /Users/<username>/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/<username>/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
but I have checked the project , there were a package.json file there:
/Users/username/Desktop/Directory/Projects/ProjectName/package.json
do I need to use npm init
to create another one?
Upvotes: 2
Views: 15140
Reputation: 1
Simply run npm init
and it will walk you through the process of creating package.json
file
Upvotes: 0
Reputation: 43728
cd to the directory where package.json is (/Users/username/Desktop/Directory/Projects/ProjectName/
in your case) and run npm install
again.
Upvotes: 1