Skip to content


EACCES, Permission denied error #194

kavenyan opened this Issue · 5 comments

5 participants


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
npm failure or email it to
npm not ok

npm member

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.


Yes, I see , thank you.


It helped! Thanks!


I still find this a very problematic issue:

@isaacs : I have tried your solution:
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.