yo icon indicating copy to clipboard operation
yo copied to clipboard

Installation failed with ENOENT for package.json

Open mjj2000 opened this issue 13 years ago • 2 comments

My OS is mac os 10.8.4. node version: 0.8.18 npm version: 1.3.1

$ sudo npm install -g [email protected] # works fine
$ sudo npm install -g [email protected] # error occurs!
$ sudo npm install -g [email protected] # error occurs!
$ sudo npm install -g [email protected] # error occurs!

This error only occurs in 1.0.0-beta.5 to 1.0.0-beta.7

Error message

npm ERR! Error: ENOENT, open '/usr/local/lib/package.json'

mjj2000 avatar Jun 28 '13 04:06 mjj2000

That is a problem on your system. You should not run npm with sudo. Check out this gist to learn how to set up npm correctly: https://gist.github.com/isaacs/579814

passy avatar Jun 28 '13 06:06 passy

Thanks for you help!

mjj2000 avatar Jun 28 '13 09:06 mjj2000