Node.bcrypt.js: node-pre-gyp ERR! Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v1.0.3/bcrypt_lib-v1.0.3-node-v59-linux-x64.tar.gz

Created on 16 Jan 2018  路  16Comments  路  Source: kelektiv/node.bcrypt.js

Hi. Same as #571 on linux :(

node-pre-gyp ERR! Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v1.0.3/bcrypt_lib-v1.0.3-node-v59-linux-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v59 ABI) (falling back to source compile with node-gyp)
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/var/git/eligibility_master/node_modules/bcrypt/build'
gyp ERR! System Linux 4.13.0-26-generic
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/var/git/eligibility_master/node_modules/bcrypt/lib/binding/bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=/var/git/eligibility_master/node_modules/bcrypt/lib/binding"
gyp ERR! cwd /var/git/eligibility_master/node_modules/bcrypt
gyp ERR! node -v v9.2.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/var/git/eligibility_master/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/var/git/eligibility_master/node_modules/bcrypt/lib/binding' (1)
node-pre-gyp ERR! stack at ChildProcess. (/var/git/eligibility_master/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:159:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:943:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
node-pre-gyp ERR! System Linux 4.13.0-26-generic
node-pre-gyp ERR! command "/usr/local/bin/node" "/var/git/eligibility_master/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /var/git/eligibility_master/node_modules/bcrypt
node-pre-gyp ERR! node -v v9.2.1
node-pre-gyp ERR! node-pre-gyp -v v0.6.36
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/var/git/eligibility_master/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/var/git/eligibility_master/node_modules/bcrypt/lib/binding' (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Most helpful comment

downgrade node allow a workaround for me...

sudo npm cache clean -f
sudo npm install -g n
sudo n 8.4.0

All 16 comments

downgrade node allow a workaround for me...

sudo npm cache clean -f
sudo npm install -g n
sudo n 8.4.0

Pre built binaries for node 9 are not yet available

@agathver is this planned? When is it expected to release? Unfortunately this is a show stopper.

I'm having the same issue on linux. its a real shame that the pre-builts aren't ready yet. Looks like I'll be using a different module for now...

I triggered a build which will upload all pre-built modules

Pre-compiled modules targeting Node 9 for Linux (GCC) and OSX have been uploaded.

downgrade node allow a workaround for me...

sudo npm cache clean -f
sudo npm install -g n
sudo n 8.4.0

It's worked for me~~!!!! Thanks a lot!

downgrade node allow a workaround for me...
sudo npm cache clean -f
sudo npm install -g n
sudo n 8.4.0

It's worked for me~~!!!! Thanks a lot!

Worked for me also!!! thanks a lot :)

@xarala221 Which version of NodeJS were you using? I believe we have binaries for all available NodeJS versions

@agathver I'm facing somewhat the same issue right now, trying to install http-proxy module which depends on bcrypt.
node version: v11.13.0
node-pre-gyp ERR! Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v1.0.3/bcrypt_lib-v1.0.3-node-v67-darwin-x64.tar.gz

@renegus v1.0.3 will not work under NodeJS 11. You have to update it to v3.0.4

downgrade node allow a workaround for me...
sudo npm cache clean -f
sudo npm install -g n
sudo n 8.4.0

It's worked for me~~!!!! Thanks a lot!

Worked for me also!!! thanks a lot :)

It didnt work on Windows 10.

npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for [email protected]: wanted {"os":"!win32","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! notsup Valid OS:    !win32
npm ERR! notsup Valid Arch:  any
npm ERR! notsup Actual OS:   win32
npm ERR! notsup Actual Arch: x64

FYI: I have 64-bit.
image

Fixed it on windows 10. Went into package.json and deleted line in dependencies with bcrypt:

Before:

"dependencies": {
    "bcrypt": "^1.0.2", <------------------
    "config": "^1.29.4",
    "express": "^4.16.2",
    "express-async-errors": "^2.1.0",
    "fawn": "^2.1.5",
    "joi": "^13.1.0",
    "joi-objectid": "^2.0.0",
    "jsonwebtoken": "^8.1.1",
    "lodash": "^4.17.4",
    "mongoose": "^5.0.2",
    "winston": "^2.4.0",
    "winston-mongodb": "^3.0.0"
  },

After:

"dependencies": {
    "config": "^1.29.4",
    "express": "^4.16.2",
    "express-async-errors": "^2.1.0",
    "fawn": "^2.1.5",
    "joi": "^13.1.0",
    "joi-objectid": "^2.0.0",
    "jsonwebtoken": "^8.1.1",
    "lodash": "^4.17.4",
    "mongoose": "^5.0.2",
    "winston": "^2.4.0",
    "winston-mongodb": "^3.0.0"
  },

Then run npm i bcrypt. Hope this helps.

@renegus v1.0.3 will not work under NodeJS 11. You have to update it to v3.0.4

@agathver, it does not works for my bcrypt installation.

Could advise on this?

Node Version: v11.14.0
Bcrypt Version: v3.0.4

Debug Log:

macusers-MacBook:RESTfulAPITutorial-password-reset HighSierra$ sudo npm install

> [email protected] install /Users/Test/Desktop/RESTfulAPITutorial-password-reset/node_modules/bcrypt
> node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using needle for node-pre-gyp https download 
node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v67 ABI, unknown) (falling back to source compile with node-gyp) 
node-pre-gyp WARN Hit error EACCES: permission denied, mkdir '/Users/Test/Desktop/RESTfulAPITutorial-password-reset/node_modules/bcrypt/lib' 
gyp ERR! configure error 
gyp ERR! stack Error: EACCES: permission denied, mkdir '/Users/Test/Desktop/RESTfulAPITutorial-password-reset/node_modules/bcrypt/build'
gyp ERR! System Darwin 18.5.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/Users/Test/Desktop/RESTfulAPITutorial-password-reset/node_modules/bcrypt/lib/binding/bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=/Users/Test/Desktop/REST
fulAPITutorial-password-reset/node_modules/bcrypt/lib/binding" "--napi_version=4" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v67"
gyp ERR! cwd /Users/Test/Desktop/RESTfulAPITutorial-password-reset/node_modules/bcrypt
gyp ERR! node -v v11.14.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-buil
d --module=/Users/Test/Desktop/RESTfulAPITutorial-password-reset/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/Users/Test/Desktop/RESTfulAPITutorial-password-reset/node_modules/bcrypt/lib/binding --napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v6
7' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/Test/Desktop/RESTfulAPITutorial-password-reset/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:193:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:999:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:266:5)
node-pre-gyp ERR! System Darwin 18.5.0
node-pre-gyp ERR! command "/usr/local/bin/node" "/Users/Test/Desktop/RESTfulAPITutorial-password-reset/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/Test/Desktop/RESTfulAPITutorial-password-reset/node_modules/bcrypt
node-pre-gyp ERR! node -v v11.14.0
node-pre-gyp ERR! node-pre-gyp -v v0.12.0
node-pre-gyp ERR! not ok 
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/Test/Desktop/RESTfulAPITutorial-password-reset/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/Users/Test/Desktop/RESTfulAPITutorial-password-reset/node_modules/bcrypt/lib/binding --napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v67' (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/Test/.npm/_logs/2019-05-09T04_44_51_945Z-debug.log

@jerrychong25 use chown to fix ownership and do not use sudo. It will fail. Npm runs as user nobody if you use sudo.

@jerrychong25 use chown to fix ownership and do not use sudo. It will fail. Npm runs as user nobody if you use sudo.

Thanks! It is working now.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

enneid picture enneid  路  5Comments

surendra172001 picture surendra172001  路  5Comments

alanosman picture alanosman  路  3Comments

summertong picture summertong  路  5Comments

Z3roCoder picture Z3roCoder  路  5Comments