Can't install or update packages


#1

I was able to install and update package a while ago, but suddenly I’m getting the following error when I try to install/update a package:


gyp info it worked if it ends with ok
gyp info using node-gyp@0.10.10
gyp info using node@0.11.10 | darwin | x64
gyp http GET https://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist/v0.11.10/node-v0.11.10.tar.gz
gyp http 200 https://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist/v0.11.10/node-v0.11.10.tar.gz
gyp ERR! UNCAUGHT EXCEPTION 
gyp ERR! stack Error: EPERM, utime '/Users/bernardog/.atom/.node-gyp/.node-gyp/0.11.10'
gyp ERR! System Darwin 13.1.0
gyp ERR! command "/Applications/Atom.app/Contents/Frameworks/Atom Helper.app/Contents/MacOS/Atom Helper" "/Applications/Atom.app/Contents/Resources/app/node_modules/atom-package-manager/node_modules/node-gyp/bin/node-gyp.js" "install" "--target=0.11.10" "--dist-url=https://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist" "--arch=x64"
gyp ERR! cwd /Users/bernardog/.atom
gyp ERR! node -v v0.11.10
gyp ERR! node-gyp -v v0.10.10
gyp ERR! This is a bug in `node-gyp`.
gyp ERR! Try to update node-gyp and file an Issue if it does not help:
gyp ERR!     <https://github.com/TooTallNate/node-gyp/issues>

It seems to be a permission error, but I don’t know how to fix this.


Build failed due to node-gyp
#2

Same error here for some packages, ex: npm-docs, terminal,…


#3

Same here, seems like it’s a new issue after updating to 0.61.0.


#4

Found a solution here Apm/npm issue installing packages


#5

This solution didn’t work for me…
I already tried to fix this issue changing nvm to use 0.10, reinstalling node-gyp… but nothing works.


#6

Well, after running some solutions that @davidmerrique has posted, I got this working installing via sudo apm install <package>.

It’s really a permission problem. But the issue is that I can’t install or update the atom packages via the atom’s settings interface. Even when I chmod -R 777 .atom/.node-gyp/ to give the proper permissions, this error persists.


#7

I’m getting the same error when using the package manager interface, however running sudo apm install <package> works like a charm.

Here’s the log:

gyp info it worked if it ends with ok
gyp info using node-gyp@0.12.2
gyp info using node@0.11.10 | darwin | x64
gyp http GET https://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist/v0.11.10/node-v0.11.10.tar.gz
gyp http 200 https://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist/v0.11.10/node-v0.11.10.tar.gz
gyp ERR! UNCAUGHT EXCEPTION 
gyp ERR! stack Error: EPERM, utime '/Users/William/.atom/.node-gyp/.node-gyp/0.11.10'
gyp ERR! System Darwin 13.1.0
gyp ERR! command "/Applications/Atom.app/Contents/Frameworks/Atom Helper.app/Contents/MacOS/Atom Helper" "/Applications/Atom.app/Contents/Resources/app/node_modules/atom-package-manager/node_modules/node-gyp/bin/node-gyp.js" "install" "--target=0.11.10" "--dist-url=https://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist" "--arch=x64"
gyp ERR! cwd /Users/William/.atom
gyp ERR! node -v v0.11.10
gyp ERR! node-gyp -v v0.12.2
gyp ERR! This is a bug in `node-gyp`.
gyp ERR! Try to update node-gyp and file an Issue if it does not help:
gyp ERR!     <https://github.com/TooTallNate/node-gyp/issues>

#8

To make it work inside atom editor, you have to give permission at .atom/.node-gyp folder, chmod -R 777 /Users/<your_username>/.atom/.node-gyp. If this doesn’t work, you can delete the .node-gyp folder. At least this worked to me, but I can’t tell you why.


Apm/npm issue installing packages
Apm update error
#9

This solution worked for me and apm recreated the directory with the proper permissions. Thanks!


#10

I removed .node-gyp, but it didn’t help. After running apm upgrade it’s returned. Now I’m curious: what’s .node-gyp's purpose?


#11

Yeah I’m still getting the same error’s as mentioned above. :frowning:


#12

apm update doesn’t do what most people seem to think it does.


#13

My issue is using the GUI to attempt to delete/update/install packages. I get the same errror as above:
http://screencloud.net/v/4oW5

This isn’t apm update/apm upgrade related. I’ve chmod’ed and deleted the .node-gyp dir but to no avail.

:frowning:


#14

I am still getting this same error. Was there a definitive solution?

I have tried changing preferences, deleting .node-gyp, reinstalling Atom, rebuilding node.js, … a few other things, I am sure. But nothing has worked. I must be missing something (there is a decent probability that I am a bonehead, too) . Help?

Here is the same error dump again:

gyp info it worked if it ends with ok
gyp info using node-gyp@0.12.2
gyp info using node@0.10.26 | darwin | x64
gyp http GET https://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist/v0.11.10/node-v0.11.10.tar.gz
gyp http 200 https://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist/v0.11.10/node-v0.11.10.tar.gz
gyp ERR! UNCAUGHT EXCEPTION 
gyp ERR! stack Error: EPERM, chmod '/Users/tgraybam/.atom/.node-gyp/.node-gyp/0.11.10'
gyp ERR! System Darwin 13.1.0
gyp ERR! command "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/atom-package-manager/bin/node_darwin_x64" "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/atom-package-manager/node_modules/node-gyp/bin/node-gyp.js" "install" "--target=0.11.10" "--dist-url=https://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist" "--arch=x64"
gyp ERR! cwd /Users/tgraybam/.atom
gyp ERR! node -v v0.10.26
gyp ERR! node-gyp -v v0.12.2
gyp ERR! This is a bug in `node-gyp`.
gyp ERR! Try to update node-gyp and file an Issue if it does not help:
gyp ERR!     <https://github.com/TooTallNate/node-gyp/issues>

Thanks!


#15

I finally got it to work.

In case it helps anyone else, here is what I did (though your milage may vary, of course)…

  1. I removed all traces of node and npm following these instructions: http://stackoverflow.com/a/11178106/1112788

  2. I reinstalled node using homebrew. (I actually had to do this twice – brew install node, brew uninstall node, brew install node – before it worked properly.)

  3. I deleted the .node-gyp file in /Users/<username>/.atom .

  4. I used the Atom GUI to install a package of the kind that never had any issues in the first place (for example Sort Lines) which recreated .node-gyp and its contents.

  5. Then finally, I was able to use the CLI to install atom-term thus: apm install term

Step 4 may have been unnecessary, and maybe I could have used the GUI again… I have no idea… but I am faithfully recounting my steps!

Hope this helps someone.


#16

To solve this you can also just open terminal and type ‘sudo atom’ - without the quotes. Easy solution.


#17

3q,this is work for me …


Trouble installing packages on Fedora 21
#18

Just to add… In Ubuntu 14.04 I did:

sudo chown -R `whoami`:`whoami` /usr/local/share/atom/
sudo chown -R `whoami`:`whoami` ~/.atom

in order to make the GUI work without sudo.
I do not know if it opens some security issues.