Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dist-files redirected to blog (was: CDN misconfigured breaking npm < 2.13.2 and < 3.1.3) #124

Closed
garthk opened this issue Sep 10, 2015 · 21 comments

Comments

@garthk
Copy link

garthk commented Sep 10, 2015

http://nodejs.org/dist is redirecting to the Node blog, breaking native module installation on fresh instances with npm versions prior to 2.13.2 and 3.1.3, both of which bundle node-gyp version 2.0.2 which switches to https://nodejs.org/dist as the base URL.

Note the Location: header below:

$ curl -D - -OL http://nodejs.org/dist/v0.10.32/node-v0.10.32.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0HTTP/1.1 301 Moved Permanently
Date: Thu, 10 Sep 2015 05:47:07 GMT
Content-Type: text/html
Transfer-Encoding: chunked
Connection: keep-alive
Set-Cookie: __cfduid=df56fbaba4359107e377b536a4d7f50a81441864026; expires=Fri, 09-Sep-16 05:47:06 GMT; path=/; domain=.nodejs.org; HttpOnly
Location: https://nodejs.org/en/blog/
Server: cloudflare-nginx
CF-RAY: 2238d6170bf50b14-SYD
...

More detail in this gist.

@GingerAdonis
Copy link

This also breaks hits/links from Google searches, which still use HTTP in most cases.

@fhemberger fhemberger changed the title CDN misconfigured breaking npm < 2.13.2 and < 3.1.3 dist-files redirected to blog (was: CDN misconfigured breaking npm < 2.13.2 and < 3.1.3) Sep 10, 2015
@fhemberger
Copy link
Contributor

@kiuma
Copy link

kiuma commented Sep 10, 2015

same bug with nvm.
I solved it changing in nvm.sh
from http://nodejs.org/dist to https://nodejs.org/dist

then I updated the env
export NVM_NODEJS_ORG_MIRROR="https://nodejs.org/dist"

@sjanecki
Copy link

please return to previous CDN configuration
all of my builds are failing because of this.
please help

@pnedelko
Copy link

+1, my builds are failing

@Fishrock123
Copy link
Contributor

cc @rvagg / @orangemocha

@drobiazko
Copy link

Some of our dependencies is using node-gyp which downloads node.js. All builds are failing with such an error:

node-gyp rebuild

gyp http GET http://nodejs.org/dist/v0.10.21/node-v0.10.21.tar.gz
gyp http 200 http://nodejs.org/dist/v0.10.21/node-v0.10.21.tar.gz
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: incorrect header check
gyp ERR! stack     at Zlib._binding.onerror (zlib.js:295:17)
gyp ERR! System Linux 3.13.0-55-generic
gyp ERR! command "node" "/tmp/node-npm-BWnW/node_modules/node-gyp/bin/node-gyp.js" "rebuild"

@alexyork
Copy link

+1 We can't deploy to production (Amazon Elastic Beanstalk)! How do we fix this...?

@amitevski
Copy link

+1
actually the response code is wrong. its a 301 to homepage.

@fhemberger
Copy link
Contributor

Yes, we know and we're already working on a fix.

@rvagg
Copy link
Member

rvagg commented Sep 10, 2015

should be fixed now, cached redirects may still get in the way however

@rvagg rvagg closed this as completed Sep 10, 2015
@godric7
Copy link

godric7 commented Sep 10, 2015

Hi.

http links are broken, but https works fine though.
I managed to get around the issue, using the npm_config_disturl environment variable (lowercase)

export npm_config_disturl=https://nodejs.org/dis fixed building with node-gyp

Apparently you can also set this value in ~/.npmrc but I haven't tested it.
Hope it helps.

@alexyork
Copy link

This is fixed for me now. The redirect is gone. My browser cached the redirect, as you said, but it works now from the command line when we do npm install. Thanks so much for the quick fix :-)

@sjanecki
Copy link

DIST files are fixed. confirmed but:

http links to repo now are broken:
http://registry.npmjs.org/node-uuid/-/node-uuid-1.4.1.tgz
vs
https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.1.tgz

@rvagg
Copy link
Member

rvagg commented Sep 10, 2015

@tereska this is an npm thing if there's a problem, but I can't see one, they both work for me

@sjanecki
Copy link

ok now they are working for me also. thanks

@fhemberger
Copy link
Contributor

@godric7 Unfortunately, there doesn't seem to be a corresponding config value in npm@2 (tried npm config edit)

@sjanecki
Copy link

thanks for the fix!

@abhisheksoni
Copy link

I think there is still some issue with this. When i try to download this url:
http://nodejs.org/dist/v0.12.7/node-v0.12.7-linux-x86.tar.gz it redirects me to blog

and when i try to download http://nodejs.org/dist/v0.12.7/node-v0.12.7-linux-x64.tar.gz, it is super slow any alternative mirrors i can use

@fhemberger
Copy link
Contributor

Can't reproduce the redirect. Maybe it's still cached on your side? /cc @nodejs/build

@rvagg
Copy link
Member

rvagg commented Sep 12, 2015

you may have a cached version of the redirect still? re slowness, we're using CloudFlare now so it should be a lot faster than it ever was, what country are you in? Also, try https instead of http for the download, not that it should make a huge difference, however.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests