Can't install any apm packages on Windows 7


#1

So… Atom 1.0 has been out a while and I’m still not able to install a single package on Windows.

I’m getting pretty much the same error message already pasted here before. Here is mine:

C:\Users\jplatte>apm install minimap
Installing minimap to C:\Users\jplatte\.atom\packages
gyp info it worked if it ends with ok
gyp info using node-gyp@1.0.2
gyp info using node@0.10.35 | win32 | ia32
gyp http GET https://atom.io/download/atom-shell/v0.22.0/node-v0.22.0.tar.gz
gyp WARN install got an error, rolling back install
gyp

I get the exact same output when trying apm install --check as suggested by Atom when it fails to install something in a settings tab (it tells me “Compiler tools not found” but not what exactly is missing…). What do I need node-v0.22.0.tar.gz for and why can’t apm / gyp give me a meaningful error message when it fails to install??

Some system info:

  • Python 2.7 installed (C:\Python27)
  • nodejs 0.12.5 installed (default location, the progx86 thing)
  • All Visual C++ runtimes any program could ever depend on, at least it feels like that:
  • VC++ 2005 (x86, x64)
  • VC++ 2008 (x86, x64)
  • VC++ 2010 (x86, x64)
  • VC++ 2012 (x86, x64)
  • I am behind a proxy but I configured that in .apmrc and searching for packages / loading features packages in Atom works, so that’s not the problem.

#2

FYI, If you are running as administrator gyp will not work. You will need to add --unsafe to the command line. If apm doesn’t support this then do

  • git clone of package repo
  • npm install --unsafe
  • apm install

Or just don’t run as administrator.


#3

What?? Why do you think I’m running Atom / apm as Administrator? And are you just talking about an administrator account or the “Run as administrator” thing? Because I definitely didn’t use the latter.

I also haven’t yet tried cloning a package repo, but thanks for the instructions, I’ll see if that works better.


#4

It was a long-shot guess. When I used windows I always ran as administrator and had this problem.

Gyp has always been problematic. The NPM folks are working on a new scheme where gyp isn’t needed. I think it may involve using asmjs.


#5

Even ones without gyp?


#6

Even ones without gyp?

I have no idea what gyp even is. I definitely had the same problem before 1.0 with seemingly trivial things like language-cmake, but today I only tried out minimap and one or two other ones on the features package list.

Unfortunately, I can’t test anything right now as it’s not my system at home where I have these problems.


#7

It is an NPM tool used to compile source code, like C/C++, into native machine code for your PC. Obviously this is more complex than just loading javascript. The log you posted was all stuff from gyp.

To chase down gyp problems you will probably need help from the repo of the package you are trying to install. Post an issue.

If you have a package that won’t install and the log doesn’t have gyp in it, then please post it so we can help track down your problem.


#8

So… Now I have a new issue with installing packages inside Atom, but although I don’t find the issue on that I’m pretty sure it’s a common thing that will be fixed in 1.0.3 (otherwise I’ll report an issue on GitHub about that, because that’s definitely a bug).

Anyway, I can still reproduce the error message (the exact same, trying to install node-v0.22.0.tar.gz, not something package-specific!) when trying to install language-haskell through apm on the command line. I’m pretty sure that package doesn’t need gyp (although I don’t know how to check). Here’s the output again, just in case:

C:\Users\jplatte>apm install language-haskell
Installing language-haskell to C:\Users\jplatte\.atom\packages
gyp info it worked if it ends with ok
gyp info using node-gyp@1.0.2
gyp info using node@0.10.35 | win32 | ia32
gyp http GET https://atom.io/download/atom-shell/v0.22.0/node-v0.22.0.tar.gz
gyp WARN install got an error, rolling back install
gyp

#9

Am I really the only one who has this big issue with using Atom on Windows? :disappointed:


#10

I’ve had problems similar to yours with gyp several times in the past few years. In each case I got it working by fooling around with my visual studio setup. The problem is with node npm packages and has nothing to do with atom. I had the first problem before Atom even existed.

You should try posting an issue with the npm repo.


#11

Finally I found a workaround: https://github.com/atom/apm/issues/322#issuecomment-96430856

Thanks for the help @mark_hahn


#12

Have you solved this problem? I am a Atom user of Windows 7, and I got this same error again and again, I can’t install any packages now…


#13

I worked around it by executing that setx command after setting my proxy in the %APPDATA%/.atom/.apmrc. The problem is that atom tries to download packages from https://atom.io/download/..., which redirects to that s3 instance, and for some reason after seeing the redirect, the node library that does the requests forgets the proxy and fails to download the file. You can subscribe to the bug report I linked to to find out when there is an actual fix instead of just a workaround.