-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Warning "root" does not have permission to access the dev dir #454
Comments
[help] same with me....
anybody can help me to solved...!!! |
Yep, I'm getting a very similar error. In my case, it happens after running: npm install grunt-browserify I get:
After that, I get the usual npm module installed boilerplate. I get the same message when I run the command with root privileges, except with 'user "root" does not have permission...' This error began happening after I upgraded node from version 0.10.21 to version 0.10.29 using the install package at http://nodejs.org/. I can see that the folder it's expecting, ~/.node-gyp/0.10.29, doesn't exist. If it helps, I'm running Mac OS X 10.9.3. I wish I knew more about the project and could suggest a fix, but I thought I'd post, just to bring it to your attention. Cheers! |
Update: as expected, everything works fine and I have no warning if I just change the name of the folder at ~/.node-gyp/0.10.21 to 0.10.29, matching my version change. I suspect those of you on Linux having a similar problem could make a similar fix. Hope it's not gonna break anything under the hood... |
If I remember correctly, set |
I'm also seeing this on SmartOS/illumos/Solaris |
+1 |
Doesn't look like the project maintainer cares much about this issue |
I solved it by using chown on the .node-gyp folder and cleaning cache if I remember correctly. |
Same problem here. Using Ubuntu 14.04. chown on the node-gyp folder did not fix the issue :( |
Solved it be adding In my case with sails: sudo npm install --unsafe-perm --verbose -g sails Works well! |
why should I set 'unsafe-perm ' =true ,what's the meaning of "unsafe-perm"? |
I met the same problem
gyp WARN EACCES user "root" does not have permission to access the dev dir "/Users/herrdu/.node-gyp/0.10.32" |
And if I create the direction ".node-gyp herrdu$ mrdir 0.10.32" ,the error is
gyp ERR! UNCAUGHT EXCEPTION Then I can't solve it!!! |
How come this is still an outstanding issue? Why is gyp even used by NPM if it's this broken with no clear solution? I've seen people recommend |
This error occurred for me when trying to install player and other libraries that depended on speaker. Looks good from the console output, but I haven't tried to play a file yet. |
FWIW - |
After removing /root/.node-gyp, sudo npm install --unsafe-perm --verbose -g solved this problem |
I have a similar problem reported here: npm/npm#7764. Is this a problem with npm or node-gyp? No solution solved my problem. When I use |
At node school, similar issue. 0 info it worked if it ends with ok |
--unsafe-perm also solved for me, installing on a Gentoo server |
Mentioned here: nodejs/node-gyp#454
Mentioned here: nodejs/node-gyp#454
i hate npm so much nodejs/node-gyp#454
It seems this is still not fixed =( |
"Don't install node/npm as root" is the fix. The issue you're seeing (see #454 (comment)) is that npm doesn't like to run as root, if you want to change that then feel free to file an issue with npm (or just search their issues, I'm sure lots of people have complained before): https://github.com/npm/npm/issues If you're seeing this without having used |
I'm not sure why this should be the right solution. Also see https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions You do not come far without sudo ;-) |
Installing node or npm with sudo, sure. But running them as root? Should never be necessary. |
Guess what, the problem occurs when I install without sudo (I did not install the package with sudo). The |
#454 (comment) The problem occurs with node 6 and npm 3 on a Debian 8 root server when I try to install sitespeed.io. With a normal |
Let me rephrase: if it doesn't work without root, chances are you are doing something wrong. If If sitespeed.io does, that's a bug in that package, but you are in the wrong bug tracker in that case. |
@DanielRuf see the npm help pages, which go into this quite exhaustively: https://docs.npmjs.com/getting-started/fixing-npm-permissions Note that this is still nothing to do with |
Well, I tried option 2 with the custom path / directory and it did not fix the issue. And I think I also tried option 1 too but npm always reset the directory. Anyway, I got it working with the |
For anyone else coming across this thread, I recommend just using
A global modules directory that is owned by the user (not by root) is the default for every install method that isn't a Linux package manager, and it works fine.
Unless you're still running with |
1️⃣ Install with a line of code $ nvm ls
$ nvm ls-remote
$ nvm install
$ nvm use
$ nvm exec ✅ Enjoy your life ;-) |
The configuration of global packages should be up to the devloper and |
@e-beach Have you actually read through the issue or is yours just a pile-up comment? |
Try |
@Davenchy Nope didn't work. |
@Davenchy |
Same issue here with angular.
Never had issue with npm and node before and now with clean os I had so many issues in the last two hours I cant believe it. |
Issue on Ubuntu 16.04.2 LTS when using This one fixed the errors and installation completed successfully |
I've taken the liberty of locking this because it's turning into one of those undead issues that attract comments long after its expiry date. For people coming here through search engines, see #454 (comment). |
For people coming here through search engines, see #454 (comment)
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 withnode-gyp
, and I see this warning for every one of them during 'npm install'. Does anyone have insight on what this warning means?The text was updated successfully, but these errors were encountered: