I have an app which depends on node.bcrypt.js. Today it fails to deploy on Heroku, giving the following error message when Heroku runs npm install as part of its compiling process:
remote: Installing node modules (package.json)
remote:
remote: > [email protected] install /tmp/build_906287cf0f8a9d6eef3c899f28b4c04f/node_modules/bcrypt
remote: > node-pre-gyp install --fallback-to-build
remote:
remote: node-pre-gyp ERR! Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v1.0.2/bcrypt_lib-v1.0.2-node-v57-linux-x64.tar.gz
remote: node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v57 ABI) (falling back to source compile with node-gyp)
remote: gyp ERR! configure error
remote: gyp ERR! stack Error: 404 response downloading https://nodejs.org/download//v8.1.1/node-v8.1.1-headers.tar.gz
remote: gyp ERR! stack at Request.<anonymous> (/tmp/build_906287cf0f8a9d6eef3c899f28b4c04f/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:210:14)
remote: gyp ERR! stack at emitOne (events.js:120:20)
remote: gyp ERR! stack at Request.emit (events.js:210:7)
remote: gyp ERR! stack at Request.onRequestResponse (/tmp/build_906287cf0f8a9d6eef3c899f28b4c04f/.heroku/node/lib/node_modules/npm/node_modules/request/request.js:1074:10)
remote: gyp ERR! stack at emitOne (events.js:115:13)
remote: gyp ERR! stack at ClientRequest.emit (events.js:210:7)
remote: gyp ERR! stack at HTTPParser.parserOnIncomingClient (_http_client.js:564:21)
remote: gyp ERR! stack at HTTPParser.parserOnHeadersComplete (_http_common.js:116:23)
remote: gyp ERR! stack at TLSSocket.socketOnData (_http_client.js:453:20)
remote: gyp ERR! stack at emitOne (events.js:115:13)
It looks like the node-gyp module is trying to download the node headers from the location https://nodejs.org/download//v8.1.1/node-v8.1.1-headers.tar.gz which yields a 404.
This is the same issue as #517 but the resolution in there (use node 7) isn't workable for me right now.
@fiznool everyone is waiting for https://github.com/kelektiv/node.bcrypt.js/pull/511 😄
This is caused by https://github.com/nodejs/node/issues/13667
Thanks @bhj.
I've been able to workaround this with the following config variable:
heroku config:set NPM_CONFIG_DISTURL=https://nodejs.org/download/release/
@fiznool This is fixed in Node 8.1.2.
Setting the new NPM dist url works very well for me.
And, almost a year later, I am still seeing this issue on Node version 10.1.0
@Sheikh-Aman just ran into this issue (Node v10.1.0), gonna try setting the new NPM dist url
EDIT: I tried that, but did not work for me on Heroku
I've run into the same issue, anyone found a solution?
I switched over to “node.bcrypt.js”, which only required a very minimal change to my codebase; this allowed me to deploy to Heroku with no issues. Good luck!
On Oct 2, 2018, at 11:06 AM, Parth Patel notifications@github.com wrote:
I've run into the same issue, anyone found a solution?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/kelektiv/node.bcrypt.js/issues/518#issuecomment-426309277, or mute the thread https://github.com/notifications/unsubscribe-auth/AD-uhmsmrpYkVwF14PV9BWsGWr8DHya_ks5ug4DcgaJpZM4N53UF.
Cheers! I'll try doing the same.
Most helpful comment
Setting the new NPM dist url works very well for me.
And, almost a year later, I am still seeing this issue on Node version 10.1.0