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

404 when trying to download Node 8.1.1 headers #1230

Closed
michaeldzjap opened this issue Jun 14, 2017 · 4 comments
Closed

404 when trying to download Node 8.1.1 headers #1230

michaeldzjap opened this issue Jun 14, 2017 · 4 comments

Comments

@michaeldzjap
Copy link

I am trying to build an npm package from source:

npm i fsevents --build-from-source

But this results in an

gyp ERR! stack Error: 404 response downloading https://nodejs.org/download//v8.1.1/node-v8.1.1-headers.tar.gz

Any help with this would be greatly appreciated. I'm on macOS v10.12.5 using node-gyp v3.6.2 and node v8.1.1.

@Jeff-Lewis
Copy link

node-gyp install throws same error as well on macOS with node 8.1.1.

Workaround:
run node-gyp install --dist-url https://nodejs.org/download/release to get the 8.1.1 headers downloaded properly then run your npm i again.

@michaeldzjap are you using nvm? I think this has something to do with *_MIRROR environment variables but I don't see anything about overrides when running node-gyp install --verbose

@bnoordhuis
Copy link
Member

Something went wrong with the release, the embedded download URL is wrong:

$ ./node-v8.1.0-darwin-x64/bin/node -p process.release
{ name: 'node',
  sourceUrl: 'https://nodejs.org/download/release/v8.1.0/node-v8.1.0.tar.gz',
  headersUrl: 'https://nodejs.org/download/release/v8.1.0/node-v8.1.0-headers.tar.gz' }

$ ./node-v8.1.1-darwin-x64/bin/node -p process.release
{ name: 'node',
  sourceUrl: 'https://nodejs.org/download//v8.1.1/node-v8.1.1.tar.gz',
  headersUrl: 'https://nodejs.org/download//v8.1.1/node-v8.1.1-headers.tar.gz' }

IOW, not a node-gyp issue. You'll have to use a workaround with v8.1.1 like the one @Jeff-Lewis posted.

@michaeldzjap
Copy link
Author

@Jeff-Lewis Thanks, explicitly specifying the URL solved the problem. I'll close the issue, since it is not related to node-gyp.

@jrforrest
Copy link

For folks finding this issue from problems with node-sass or other things running gyp from a postinstall script where passing --dist-url is difficult, workaround with NPM_CONFIG_DISTURL=https://nodejs.org/download/release/ in your env instead.

If you're on Heroku, just do a heroku config:set NPM_CONFIG_DISTURL=https://nodejs.org/download/release/ to get your build working again.

Do make sure to unset this var on the next node release so your build doesn't break if the values from node -p process.release change later on.

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

No branches or pull requests

4 participants