apm install failed in HTTP 404 error when gyp is downloading node.js with a fresh install atom

Description

[Description of the bug or feature]
apm install failed in HTTP 404 error when gyp is downloading node.js with a fresh install gyp. This issue will stop new users from downloading any package.

Steps to Reproduce

  1. Mac Refresh install ATOM latest version: 1.54
  2. goto command line
  3. type: “apm install script”
  4. 404 happen:
bogon:~ linwei$ apm install script
Installing script to C:\Users\linwei\.atom\packages
gyp info it worked if it ends with ok
gyp info using node-gyp@2.0.2
gyp info using node@0.10.40 | win32 | ia32
gyp http GET https://atom.io/download/atom-shell/v0.34.5/node-v0.34.5.tar.gz
gyp http 404 https://atom.io/download/atom-shell/v0.34.5/node-v0.34.5.tar.gz
gyp WARN install got an error, rolling back install
gyp
bogon:~ linwei$ 

Expected behavior: [What you expected to happen]
package ‘script’ should be installed if I type “apm install script”

Actual behavior: [What actually happened]
gyp failed into 404, seems like gyp doesn’t recognize http 302 redirection.

Versions

You can get this information from executing atom --version and apm --version at the command line.

bogon:~ linwei$ atom --version
1.5.4
bogon:~ linwei$ apm --version
apm  1.6.0
npm  2.13.3
node 0.10.40
python 2.7.10
git 2.5.4

1 possible answer(s) on “apm install failed in HTTP 404 error when gyp is downloading node.js with a fresh install atom

  1. Resolved at atom/apm#322 !

    btw, if you are in china, config your proxy at ~/.atom/.apmrc:

    strict-ssl = false
    proxy=http://127.0.0.1:20090/
    http_proxy=proxy
    https_proxy=proxy
    

    Thanks @TedThiCo


    Seems that node-gyp isn’t following the 302 Redirect sent by atom.io.

    @fujisaks Thanks for pointing to the problem!

    I’ve been able to workaround the issue by setting the ATOM_NODE_URL env variable to the new url (after redirect ). This should also be working after you update Atom. However, remove the entry when the bug gets fixed!

    Windows temporary:

    set ATOM_NODE_URL=http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist
    

    Windows permanently:

    setx ATOM_NODE_URL http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist /M
    

    Linux

    export ATOM_NODE_URL=http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist