Skip to content
This repository

EACCES, Permission denied error #194

Closed
kavenyan opened this Issue · 4 comments

4 participants

三七 Isaac Z. Schlueter Yiğit Genç Kumar Harsh
三七

I run "sudo npm install yui3", errors is #191, I run "ulimit -n 64",and try again ,but the errors still exist. I run "npm help install", the info is :

kaven:nodejs-yui3 kaven$ npm help install
npm it worked if it ends with ok
npm cli [ 'help', 'install' ]
npm version 0.1.26
npm config file /Users/kaven/.npmrc
npm config file /usr/local/etc/npmrc
npm ! ERROR !
npm ! ERROR ! Error: Failed to make /usr/local/lib/node/.npm/.tmp while ensuring /usr/local/lib/node/.npm/.tmp
npm ! ERROR ! EACCES, Permission denied '/usr/local/lib/node/.npm/.tmp'
npm ! ERROR ! at MKDIRCB (/usr/local/lib/node/.npm/npm/0.1.26/package/lib/utils/mkdir-p.js:30:29)
npm ! ERROR ! at node.js:764:9
npm ! ERROR !
npm failure try running: 'npm help help'
npm failure Report this entire log at http://github.com/isaacs/npm/issues
npm failure or email it to npm-@googlegroups.com
npm not ok

Isaac Z. Schlueter
Owner

If you use sudo with npm, you need to use sudo with npm all the time.

Don't use sudo. Do this instead:

sudo chown -R $USER /usr/local/

and then never use sudo again with npm.

http://foohack.com/2010/08/intro-to-npm/#what_no_sudo

三七

Yes, I see , thank you.

Yiğit Genç

It helped! Thanks!

Kumar Harsh

I still find this a very problematic issue:

@isaacs : I have tried your solution: http://foohack.com/2010/08/intro-to-npm/#what_no_sudo
If I now make a file manually at /usr/lib, it works, and also works for some packages.

But, npm install -g fails for some packages, which try to make a symlink (to /usr/bin I suppose). I guess there is no solution but to use sudo then, is there?

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.