20 2016

gyp http 404 error while updating package in Atom


While updating plugins on Atom, it often fails. If you try using apm to update manually, the gyp reports a 404 error.

However if you try to download the file https://atom.io/download/atom-shell/v0.36.8/node-v0.36.8.tar.gz, it turns out to be there, not 404.


What happened?

Followed this Issue, and I found node-gyp isn’t following the 302 Redirect sent by atom.io.

I have had this problem before, which the program writing in JS don’t follow the 302 redirect.

The gyp seems it can’t recognize HTTP Status Code, and mistake every code it can’t recognize for 404.

When it will happen?

This problem came out after the version 1.7 of Atom released. I think this should be a bug of new version, beacause at 1.6.1, there is no such a problem.

How to fix it temporarily?

As this Issue said, setting the ATOM_NODE_URL env variable will help you to fixed.

Windows(Tested by myself):

Linux(I didn’t test yet):

As the Issue said, remove the entry when the bug gets fixed! You can get more information in that issue.

Will it work?

Actually, I’m not sure. Before hours, Atom.io released the new version v1.7.2, and this bug is still there.

What’s more? After I search from Google, It seems that if you are forced to using a proxy, the gyp may ignore the setting. There are a long way to go.


电子邮件地址不会被公开。 必填项已用*标注