cannot npm install react-devtools #741
Comments
installing electron with my package manager, then reinstalling react-devtools seems to work |
hmm actually, even if npm install didn't raise an error, react-devtools is still unusable:
Of course, I tried to remove the node_modules/electron dir several times and reinstalling without success (still hangs) |
Why are you running this command with sudo? Generally using sudo with npm is extremely error prone and leads to all sorts of issues with corrupted permissions. |
I used sudo because I cannot install globally as my user, something to do with the nobody user.
|
You should change global Node modules directory to something writable by all users. Not saying this will fix the problem but it's a better way. Npm just doesn't work well with sudo. |
Did changing permissions on the I just checked and was able to |
my react native project got cancelled, and I'm already using the chrome extension for react-devtools, so I don't need to install this locally anymore. Closing. |
chown USER:root /usr/lib/node_modules/ resolves "EACCES: permission denied, access /usr/lib/node_module" |
Been having the same issue (wasn't using sudo for npm i), resolved it by globally installing electron and then react-devtools. |
After fixing the permission issue with npm global install (see https://docs.npmjs.com/getting-started/fixing-npm-permissions) (I did Option 2), i do the following: $ npm uninstall -g react-devtools
$ npm uninstall -g electron
$ npm install -g --verbose react-devtools Then the terminal will show the downloading process: |
This does the trick for me.
|
@ghost Thanks that solve the issue !!! |
@brancooo1 Thanks your solution works for me. |
@brancooo1 thanks ... it works 👍 |
@ghost thanks a lot! |
@brancooo1 yeah |
I've changed rights on global node_modules directory and then installed devtools |
after trying all other options - this one worked as pointed out by @brancooo1 sudo npm install -g react-devtools --unsafe-perm=true |
adding thanks for @brancooo1 |
What does the flag --unsafe-perm=true mean???? I used it and it worked but i do know understand what i just did. Please point me to a resource to learn this.to know.thanks |
@brancooo1 thank's |
Maybe this is what you want |
The real solution! |
|
--unsafe-perm=true works for me, thanks Peoples. https://geedew.com/What-does-unsafe-perm-in-npm-actually-do/ |
jedi |
Faced same issue, tried several answers found on the web and the solution provided by @brancooo1 worked like a charm, thanks bro.
|
you need to change the node_modules permission to all users that should fix it. |
it's better to look at this link it's work |
Running:
Hangs when trying to install electron. Can be reproduced with
$ npm install electron
.The text was updated successfully, but these errors were encountered: