question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Warning "root" does not have permission to access the dev dir

See original GitHub issue

For people coming here through search engines, see https://github.com/nodejs/node-gyp/issues/454#issuecomment-315691803

gyp WARN EACCES user "root" does not have permission to access the dev dir "/home/travis/.node-gyp/0.10.28"

I’m filing this here because node-gyp is the only package that seems to throw this issue. My project depends on some modules which build with node-gyp, and I see this warning for every one of them during ‘npm install’. Does anyone have insight on what this warning means?

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:66 (14 by maintainers)

github_iconTop GitHub Comments

168reactions
BaggersIOcommented, Oct 12, 2014

Solved it be adding --unsafe-perm.

In my case with sails:

sudo npm install --unsafe-perm --verbose -g sails

Works well!

24reactions
kulicuucommented, Jul 7, 2014

If I remember correctly, set unsafe-perm to true when running as sudo is a fix it’s obstructing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

gyp WARN EACCES user "root" does not have permission to ...
The directory had wrong permissions - it was not writable (which would have been a better error message than "accessible"). And because it...
Read more >
Installing npm package failing because of (permissions?)
Hello, im currently trying to clone a git repo for something but when executing sudo npm install on the package. ... npm is...
Read more >
I Can't access the root folder - Ask Ubuntu
Yes, this is normal to Ubuntu and every Linux distributions. You can't access to the root folder because that folder is owned by...
Read more >
Can't install - Questions - n8n community
I try to install n8n on Ubuntu 20.04 with this command: npm install n8n -g but it gave error: npm WARN deprecated [email...
Read more >
Solved : EACCES current user ("nobody") does not have ...
gyp WARN EACCES current user ("nobody") does not have permission to access the dev dir "/home/devlab/.cache/node-gyp/8.10.0" gyp WARN EACCES attempting to ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found