Node.bcrypt.js: Failed at the [email protected] install

Created on 11 Jan 2017  路  70Comments  路  Source: kelektiv/node.bcrypt.js

  • What went wrong: Failed at the [email protected] install script 'node-gyp rebuild'.
  • What did you expect to happen: npm install bcrypt --g
  • Which version of nodejs: [email protected] and OS: Windows 8

  • I get the follwoing error while installing 'bcrypt'
    $ npm install bcrypt --g

[email protected] install C:\Users\MY\AppData\Roaming\npmnode_modules\bcrypt
node-pre-gyp install --fallback-to-build

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-v48-win32-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v48 ABI) (falling back to source compile with node-gyp)
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere. [C:\Users\MY\AppData\Roaming\npmnode_modules\bcrypt\build\binding.sln]
gyp ERR! build error
gyp ERR! stack Error: C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\MY\AppData\Roaming\npmnode_modulesnode-gyp\lib\build.js:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\MY\AppData\Roaming\npm\node_modules\node-gyp\bin\node-gyp.js" "build" "--fallback-to-build" "--module=C:\Users\MY\AppData\Roaming\npm\node_modules\bcrypt\lib\binding\bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=C:\Users\MY\AppData\Roaming\npm\node_modules\bcrypt\lib\binding"
gyp ERR! cwd C:\Users\MY\AppData\Roaming\npmnode_modules\bcrypt
gyp ERR! node -v v6.9.4
gyp ERR! node-gyp -v v3.5.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Filesnodejsnode.exe C:\Users\MY\AppData\Roaming\npmnode_modulesnode-gyp\binnode-gyp.js build --fallback-to-build --module=C:\Users\MY\AppData\Roaming\npmnode_modules\bcrypt\lib\binding\bcrypt_lib.node --module_name=bcrypt_lib --module_path=C:\Users\MY\AppData\Roaming\npmnode_modules\bcrypt\lib\binding' (1)
node-pre-gyp ERR! stack at ChildProcess. (C:\Users\MY\AppData\Roaming\npmnode_modules\bcryptnode_modulesnode-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:106:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:191:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:877:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
node-pre-gyp ERR! System Windows_NT 6.3.9600
node-pre-gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\MY\AppData\Roaming\npm\node_modules\bcrypt\node_modules\node-pre-gyp\bin\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\MY\AppData\Roaming\npmnode_modules\bcrypt
node-pre-gyp ERR! node -v v6.9.4
node-pre-gyp ERR! node-pre-gyp -v v0.6.32
node-pre-gyp ERR! not ok
Failed to execute 'C:\Program Filesnodejsnode.exe C:\Users\MY\AppData\Roaming\npmnode_modulesnode-gyp\binnode-gyp.js build --fallback-to-build --module=C:\Users\MY\AppData\Roaming\npmnode_modules\bcrypt\lib\binding\bcrypt_lib.node --module_name=bcrypt_lib --module_path=C:\Users\MY\AppData\Roaming\npmnode_modules\bcrypt\lib\binding' (1)
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "bcrypt" "--g"
npm ERR! node v6.9.4
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE

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 'node-pre-gyp install --fallback-to-build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the bcrypt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-pre-gyp install --fallback-to-build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs bcrypt
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls bcrypt
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! C:\greenapp\next\rest\npm-debug.log

Most helpful comment

Hi,

same problem on Ubuntu16.04 x64:

> [email protected] install /root/hpu-dog-back-end/node_modules/bcrypt
> node-pre-gyp install --fallback-to-build

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-v48-linux-x64.tar.gz 
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v48 ABI) (falling back to source compile with node-gyp) 
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp ERR! configure error 
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack     at failNoPython (/root/.nvm/versions/node/v6.9.2/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:449:14)
gyp ERR! stack     at /root/.nvm/versions/node/v6.9.2/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:353:11
gyp ERR! stack     at F (/root/.nvm/versions/node/v6.9.2/lib/node_modules/npm/node_modules/which/which.js:69:16)
gyp ERR! stack     at E (/root/.nvm/versions/node/v6.9.2/lib/node_modules/npm/node_modules/which/which.js:81:29)
gyp ERR! stack     at /root/.nvm/versions/node/v6.9.2/lib/node_modules/npm/node_modules/which/which.js:90:16
gyp ERR! stack     at /root/.nvm/versions/node/v6.9.2/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:44:5
gyp ERR! stack     at /root/.nvm/versions/node/v6.9.2/lib/node_modules/npm/node_modules/which/node_modules/isexe/access.js:8:5
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:123:15)
gyp ERR! System Linux 4.4.0-53-generic
gyp ERR! command "/root/.nvm/versions/node/v6.9.2/bin/node" "/root/.nvm/versions/node/v6.9.2/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/root/hpu-dog-back-end/node_modules/bcrypt/lib/binding/bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=/root/hpu-dog-back-end/node_modules/bcrypt/lib/binding"
gyp ERR! cwd /root/hpu-dog-back-end/node_modules/bcrypt
gyp ERR! node -v v6.9.2
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/root/.nvm/versions/node/v6.9.2/bin/node /root/.nvm/versions/node/v6.9.2/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/root/hpu-dog-back-end/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/root/hpu-dog-back-end/node_modules/bcrypt/lib/binding' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/root/hpu-dog-back-end/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at emitTwo (events.js:106:13)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:877:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
node-pre-gyp ERR! System Linux 4.4.0-53-generic
node-pre-gyp ERR! command "/root/.nvm/versions/node/v6.9.2/bin/node" "/root/hpu-dog-back-end/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /root/hpu-dog-back-end/node_modules/bcrypt
node-pre-gyp ERR! node -v v6.9.2
node-pre-gyp ERR! node-pre-gyp -v v0.6.32
node-pre-gyp ERR! not ok 
Failed to execute '/root/.nvm/versions/node/v6.9.2/bin/node /root/.nvm/versions/node/v6.9.2/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/root/hpu-dog-back-end/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/root/hpu-dog-back-end/node_modules/bcrypt/lib/binding' (1)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! Linux 4.4.0-53-generic
npm ERR! argv "/root/.nvm/versions/node/v6.9.2/bin/node" "/root/.nvm/versions/node/v6.9.2/bin/npm" "install" "bcrypt"
npm ERR! node v6.9.2
npm ERR! npm  v3.10.9
npm ERR! code ELIFECYCLE

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 'node-pre-gyp install --fallback-to-build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the bcrypt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-pre-gyp install --fallback-to-build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs bcrypt
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls bcrypt

Thanks!

All 70 comments

467

Hi,

same problem on OSX:

$ npm i bcrypt --save

[email protected] install /Users/antwal/Projects/db_replica/node_modules/bcrypt
node-pre-gyp install --fallback-to-build

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-v48-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v48 ABI) (falling back to source compile with node-gyp)

Please install compilers and pre-requisites for your systems.

hi

Please install compilers and pre-requisites for your systems.

which is compilers and pre-requisites?

if install 0.8.7 working without problems; I receive the error only with version 1.0.0, 1.0.1 and 1.0.2

Thanks.

Hi,

this is a test:

1.0.x not working : http://pastebin.com/rbp135gX

0.8.7 working : http://pastebin.com/M0kP62nQ

node : v6.9.1
npm : 4.0.3

gcc :
Configured with: --prefix=/Applications/Developer/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin13.4.0
Thread model: posix

clang :
Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin13.4.0
Thread model: posix

Thanks.

@antwal : @Agathver is referring to this being a prereq: https://github.com/nodejs/node-gyp (it has system specific prerequisites)

However, I have done that and still get the same error, so.... ymmv

hi

@antwal : @Agathver is referring to this being a prereq: https://github.com/nodejs/node-gyp (it has system specific prerequisites)

However, I have done that and still get the same error, so.... ymmv

node-gyp is installed with all requisites... but bcrypt 1.0.xnot working

Had the same problem on OS X. Solved by installing the command line tools in Xcode :)

hi

Had the same problem on OS X. Solved by installing the command line tools in Xcode :)

which version of OSX and Xcode?

with Mavericks 10.9.5, Xcode 6.2 (2333) not working..

[SOLVED] i have build it from source with node-pre-gyp, now working the 1.0.x; but if try build it with node-gyp only i receive a error on build...

here test with node-gyp : http://pastebin.com/eB2H2G2z

here test with node-pre-gyp : http://pastebin.com/WmmJFhiz

here test unit after build with node-pre-gyp : http://pastebin.com/2R34mkRC

I believe there is a bug on node-gyp or are not all of the dependencies

Even with make and python installed I still can't compile this:

make: Entering directory '/opt/app/node_modules/bcrypt/build'
  CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
  CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt.o
  CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt_node.o
g++: internal compiler error: Killed (program cc1plus)

This is on DigitalOcean's base tier so it's probably a memory bottleneck. But still, it's ridiculous that it has come to this.

Hi,

same problem on Ubuntu16.04 x64:

> [email protected] install /root/hpu-dog-back-end/node_modules/bcrypt
> node-pre-gyp install --fallback-to-build

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-v48-linux-x64.tar.gz 
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v48 ABI) (falling back to source compile with node-gyp) 
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp ERR! configure error 
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack     at failNoPython (/root/.nvm/versions/node/v6.9.2/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:449:14)
gyp ERR! stack     at /root/.nvm/versions/node/v6.9.2/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:353:11
gyp ERR! stack     at F (/root/.nvm/versions/node/v6.9.2/lib/node_modules/npm/node_modules/which/which.js:69:16)
gyp ERR! stack     at E (/root/.nvm/versions/node/v6.9.2/lib/node_modules/npm/node_modules/which/which.js:81:29)
gyp ERR! stack     at /root/.nvm/versions/node/v6.9.2/lib/node_modules/npm/node_modules/which/which.js:90:16
gyp ERR! stack     at /root/.nvm/versions/node/v6.9.2/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:44:5
gyp ERR! stack     at /root/.nvm/versions/node/v6.9.2/lib/node_modules/npm/node_modules/which/node_modules/isexe/access.js:8:5
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:123:15)
gyp ERR! System Linux 4.4.0-53-generic
gyp ERR! command "/root/.nvm/versions/node/v6.9.2/bin/node" "/root/.nvm/versions/node/v6.9.2/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/root/hpu-dog-back-end/node_modules/bcrypt/lib/binding/bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=/root/hpu-dog-back-end/node_modules/bcrypt/lib/binding"
gyp ERR! cwd /root/hpu-dog-back-end/node_modules/bcrypt
gyp ERR! node -v v6.9.2
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/root/.nvm/versions/node/v6.9.2/bin/node /root/.nvm/versions/node/v6.9.2/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/root/hpu-dog-back-end/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/root/hpu-dog-back-end/node_modules/bcrypt/lib/binding' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/root/hpu-dog-back-end/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at emitTwo (events.js:106:13)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:877:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
node-pre-gyp ERR! System Linux 4.4.0-53-generic
node-pre-gyp ERR! command "/root/.nvm/versions/node/v6.9.2/bin/node" "/root/hpu-dog-back-end/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /root/hpu-dog-back-end/node_modules/bcrypt
node-pre-gyp ERR! node -v v6.9.2
node-pre-gyp ERR! node-pre-gyp -v v0.6.32
node-pre-gyp ERR! not ok 
Failed to execute '/root/.nvm/versions/node/v6.9.2/bin/node /root/.nvm/versions/node/v6.9.2/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/root/hpu-dog-back-end/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/root/hpu-dog-back-end/node_modules/bcrypt/lib/binding' (1)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! Linux 4.4.0-53-generic
npm ERR! argv "/root/.nvm/versions/node/v6.9.2/bin/node" "/root/.nvm/versions/node/v6.9.2/bin/npm" "install" "bcrypt"
npm ERR! node v6.9.2
npm ERR! npm  v3.10.9
npm ERR! code ELIFECYCLE

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 'node-pre-gyp install --fallback-to-build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the bcrypt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-pre-gyp install --fallback-to-build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs bcrypt
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls bcrypt

Thanks!

Hi,

I solved the problem,

Dependencies:

npm install node-gyp -g

apt-get install python
apt-get install make
apt-get install g++

 ```

But,
There are some issues

Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v1.0.2/bcrypt_lib-v1.0.2-node-v48-linux-x64.tar.gz
```

Why?

Thanks!

We do have pre built binaries uploaded for macOS like it is available for 0.8.7.
I'm working to automate the build uploading process and will hopefully be available soon.

For anyone else who can't get past this but needs bcrypt support, I switched to bcryptjs. API is the same, just a bit slower since it doesn't use native bindings. Works good enough for me.

Same here on Debian, but it's not surprising because the following url is invalid:
https://github.com/kelektiv/node.bcrypt.js/releases/download/v1.0.2/bcrypt_lib-v1.0.2-node-v51-linux-x64.tar.gz

Same here:

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-v51-linux-x64.tar.gz

I have this same issue. The pre-built libraries link is incorrect forcing a fallback build that my system isn't able to do. Current proper link would be, https://github.com/kelektiv/node.bcrypt.js/archive/v1.0.2.tar.gz as is stated in the package.json but apparently not in the npmjs registry?

Hey guys.. had the same problem, the npm link seems to be incorrect. Is there a way I can update it to: https://github.com/kelektiv/node.bcrypt.js/archive/v1.0.2.tar.gz

I had the same issue on osx where it wasn't building bcrypt.
Fixed by setting python path as it doesn't seem to be set by default

npm config set python /path/to/executable/python

still get 'Tried to download(404)' as it's not prebuilt but then it builds from source

Is there any workaround? I have to deploy Parse server to AWS and Azure, but I can't because of this error.

@seonman See #470
If it's an EC2, installing python and build-essentials (gcc, headers etc) before installing bcrypt.

@seonman , For AWS Beanstalk or EC2, you need install gcc. headers, etc... For EC2 you can use SSH, for Beanstalk you can write a custom config for deploy, here doc

For those on Ubuntu that are getting this sort of thing:

...
gyp ERR! build error 
gyp ERR! stack Error: not found: make
gyp ERR! stack     at getNotFoundError (/usr/lib/node_modules/npm/node_modules/which/which.js:13:12)
...

You likely just need build-essential: sudo apt-get install build-essential

@Agathver, @antwal Could you give me a sample config file for AWS elastic beanstalk to install required software for bcrypt? I tried, but it still fails. Thanks in advance.

Same issue with me

The better solution for my was use this library https://github.com/dcodeIO/bcrypt.js

bcrypt.js is very slow

help:fearful:, we need fix:fire:

: (

@harmandeveloperprogram Would not be the appropriate section; It is extremely simple; on RHEL, you must add to your config: .ebextensions/app.config, these lines:

packages:
聽聽 yum:
聽聽聽聽 gcc: []
聽聽聽聽 make: []
聽聽聽聽 openssl-devel: []
聽聽聽聽 libxml2: []
聽聽聽聽 libxml2-devel: []
聽聽聽聽 gcc-c++: []

you can also use hooks if you need a particular installation; everything you find in the official documentation of amazon

Any update on this? I can't build this running on a base digital ocean droplet using node 7.4. I've installed build essentials, make g++ etc and still getting a build error.

@joshjg you're comment helped me resolve this. Turned out to be a memory issue -- upgrading to 1gb instance made it all go away 馃憤

@jamesdixon You can add a 4GB swap file to make it compile

The original issue was Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere. This issue has moved away from that. Closing.

@antwal I tried with your app.config, but no good. I got this error. Do you have any clue?


/var/log/eb-commandprocessor.log

Failed to run npm install. Snapshot logs for more details.
Traceback (most recent call last):
File "/opt/elasticbeanstalk/containerfiles/ebnode.py", line 695, in
main()
File "/opt/elasticbeanstalk/containerfiles/ebnode.py", line 677, in main
node_version_manager.run_npm_install(options.app_path)
File "/opt/elasticbeanstalk/containerfiles/ebnode.py", line 136, in run_npm_install
self.npm_install(bin_path, self.config_manager.get_container_config('app_staging_dir'))
File "/opt/elasticbeanstalk/containerfiles/ebnode.py", line 180, in npm_install
raise e
subprocess.CalledProcessError: Command '['/opt/elasticbeanstalk/node-install/node-v6.9.1-linux-x64/bin/npm', '--production', 'rebuild']' returned non-zero exit status 1 (ElasticBeanstalk::ExternalInvocationError)
caused by: + /opt/elasticbeanstalk/containerfiles/ebnode.py --action npm-install

[email protected] install /tmp/deployment/application/node_modules/bcrypt
node-pre-gyp install --fallback-to-build

module.js:471
throw err;
^

Error: Cannot find module '../'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (/tmp/deployment/application/node_modules/.bin/node-pre-gyp:15:20)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)

npm ERR! Linux 4.4.41-36.55.amzn1.x86_64
npm ERR! argv "/opt/elasticbeanstalk/node-install/node-v6.9.1-linux-x64/bin/node" "/opt/elasticbeanstalk/node-install/node-v6.9.1-linux-x64/bin/npm" "--production" "rebuild"
npm ERR! node v6.9.1
npm ERR! npm v3.10.8
npm ERR! code ELIFECYCLE
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 'node-pre-gyp install --fallback-to-build'.

Same problem here! PLEASE FIX!!

@Agathver, @defunctzombie, I think this error warrants making sure that the npm install link is correct? Seems like that simple update would fix the problem.

Same problem! (Ubuntu 64)

Same problem with github link here 404! I don't know what is the problem and why it tried to download from a wrong github URL!

Mac OS X 10.12
Latest version of Xcode + Xcode CLI developer tools
npm v4.2.0
node v6.9.5
Please open this issue

Added this pull request, fixed my problem: https://github.com/kelektiv/node.bcrypt.js/pull/489

I'm also having this issue. Platform: Ubuntu 16.04.1 x64

Windows users can try with npm install --global --production windows-build-tools

I just experience this issue today. Thanks to the solutions above I was able to get past it. But I'm concerned that it hasn't been fixed, it's been over a month now and this could be impacting a lot of people.

I'm also receiving this error when I attempt to deploy to heroku. I'm not sure how to fix this issue..

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-v48-linux-x64.tar.gz

I too experiencing same issue on Ubuntu 16.04 LTS with Node V6.4

> [email protected] install /home/shivaraj/bitbucket/freshersuniverse-middleware/node_modules/bcrypt
> node-pre-gyp install --fallback-to-build

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-v48-linux-x64.tar.gz 
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v48 ABI) (falling back to source compile with node-gyp) 
make: Entering directory '/home/shivaraj/bitbucket/freshersuniverse-middleware/node_modules/bcrypt/build'
  CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
./Release/.deps/Release/obj.target/bcrypt_lib/src/blowfish.o.d.raw { dev: 2055,
  mode: 33204,
  nlink: 1,
  uid: 1000,
  gid: 1000,
  rdev: 0,
  blksize: 4096,
  ino: 1837678,
  size: 86,
  blocks: 8,
  atime: 2017-02-27T10:00:58.000Z,
  mtime: 2017-02-27T10:00:58.000Z,
  ctime: 2017-02-27T10:00:58.048Z,
  birthtime: 2017-02-27T10:00:58.048Z }
  CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt.o
./Release/.deps/Release/obj.target/bcrypt_lib/src/bcrypt.o.d.raw { dev: 2055,
  mode: 33204,
  nlink: 1,
  uid: 1000,
  gid: 1000,
  rdev: 0,
  blksize: 4096,
  ino: 1837678,
  size: 82,
  blocks: 8,
  atime: 2017-02-27T10:00:59.000Z,
  mtime: 2017-02-27T10:00:59.000Z,
  ctime: 2017-02-27T10:00:59.760Z,
  birthtime: 2017-02-27T10:00:59.760Z }
  CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt_node.o
./Release/.deps/Release/obj.target/bcrypt_lib/src/bcrypt_node.o.d.raw { dev: 2055,
  mode: 33204,
  nlink: 1,
  uid: 1000,
  gid: 1000,
  rdev: 0,
  blksize: 4096,
  ino: 1837678,
  size: 1368,
  blocks: 8,
  atime: 2017-02-27T10:01:19.000Z,
  mtime: 2017-02-27T10:01:19.000Z,
  ctime: 2017-02-27T10:01:19.050Z,
  birthtime: 2017-02-27T10:01:19.050Z }
  SOLINK_MODULE(target) Release/obj.target/bcrypt_lib.node
  COPY Release/bcrypt_lib.node
  COPY /home/shivaraj/bitbucket/freshersuniverse-middleware/node_modules/bcrypt/lib/binding/bcrypt_lib.node
  TOUCH Release/obj.target/action_after_build.stamp
Release/obj.target/action_after_build.stamp { dev: 2055,
  mode: 33204,
  nlink: 1,
  uid: 1000,
  gid: 1000,
  rdev: 0,
  blksize: 4096,
  ino: 1837690,
  size: 0,
  blocks: 0,
  atime: 2017-02-27T10:01:22.000Z,
  mtime: 2017-02-27T10:01:22.000Z,
  ctime: 2017-02-27T10:01:22.213Z,
  birthtime: 2017-02-27T10:01:22.213Z }
make: Leaving directory '/home/shivaraj/bitbucket/freshersuniverse-middleware/node_modules/bcrypt/build'
f

What is the solution guys ? Please explain in short. Thanks in advance..

@shivarajnaidu the solution is install build tools and latest version of nodejs

@devKC on heroku like on aws read the documentation for install build tools

@michelgokan I had the same problem on an older version of OSX; El Captian works smoothly; so I think installing everything functions properly even on Sierra

Thank You For Your Kind Response @antwal .. But I have installed build tools and this error occurring in resent installations of bcrypt only on in older builds and what about 404 error in that output...???

@antwal both build tools and the latest version of Node.js are installed but I am still getting this error.

The same thing happens on Mac OS, I have the latest Node, npm and Build Tools installed.

> [email protected] install /Users/robertjakobson/Desktop/kruvid-ee/node_modules/bcrypt
> node-pre-gyp install --fallback-to-build
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-v46-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v46 ABI) (falling back to source compile with node-gyp)
  CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
c++: error: x86_64: No such file or directory
c++: error: unrecognized option '-arch'
make: *** [Release/obj.target/bcrypt_lib/src/blowfish.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/robertjakobson/Desktop/kruvid-ee/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:12)
gyp ERR! System Darwin 16.4.0
gyp ERR! command "/Users/robertjakobson/.meteor/packages/meteor-tool/.1.4.3_1.ju6dmy++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/bin/node" "/Users/robertjakobson/Desktop/kruvid-ee/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/robertjakobson/Desktop/kruvid-ee/node_modules/bcrypt/lib/binding/bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=/Users/robertjakobson/Desktop/kruvid-ee/node_modules/bcrypt/lib/binding"
gyp ERR! cwd /Users/robertjakobson/Desktop/kruvid-ee/node_modules/bcrypt
gyp ERR! node -v v4.7.3
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
node-pre-gyp ERR! build error
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 'node-pre-gyp install --fallback-to-build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the bcrypt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-pre-gyp install --fallback-to-build

@newdesignideas You have tried also with node-pre-gyp : here? I have this problem only with old OSX version.

@antwal in this post you mentioned, "I have build it from source with node-pre-gyp". Can you describe the steps you performed? I am having the same issue as @newdesignideas even after updating node, npm, node-pre-gyp, node-gyp, and the xcode command line tools.

Also, who can someone add the tarball file so that we avoid this portion of the error?
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-v51-darwin-x64.tar.gz

[EDIT] It turns out that for me there was an issue with the folder version naming for node-gyp. In the .node-gyp folder (under /Users/YOURUSERNAME/.node-gyp) I renamed the 6.x folder to the version of node I'm using, which allowed the installation to succeed.

@chris-guidry @newdesignideas

OSX Mavericks 10.9.5 - xcode 6.2 - npm 4.0.3 - node 6.9.1 (without brew)

OSX El Capitan 10.11.6 - xcode 8.2.1 - npm 3.10.10 - node 6.10.0 (without brew)

  • sudo -H npm install node-gyp -g

Redhat Enterprise 7 (epel repo)

  • yum install nodejs npm --enablerepo=epel
  • yum groupinstall "Development tools"

Windows 10 - here

On Ubuntu 16.04 I did sudo npm install bcrypt --save instead of npm install bcrypt --save to make it works. This doesn't work without sudo because I got this message gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/6.10.0"

sudo for bcrypt !!!!
Is it okay to use like that ?!!!!!!!

Ubuntu 16.04 on DigitalOcean (512 MB / 1 CPU, 20 GB SSD)

The following worked for me:

  1. Scale droplet up to the 1 GB RAM option

  2. Run each of the following commands

    sudo npm install node-gyp -g
    sudo apt-get install python
    sudo apt-get install make
    sudo apt-get install g++
    
  3. Then try again with:

    npm install bcrypt --save
    
  4. Scale droplet back down to the 512 MB option

@dotspencer not work for me, Virtual Host/Vagrant/Ubuntu 12.04

5520 warn optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents): 5521 warn notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) 5522 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS: darwin 5522 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch: any 5522 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS: linux 5522 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64 5523 verbose stack Error: [email protected] install:node-pre-gyp install --fallback-to-build 5523 verbose stack Exit status 1 5523 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:279:16) 5523 verbose stack at emitTwo (events.js:106:13) 5523 verbose stack at EventEmitter.emit (events.js:194:7) 5523 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:40:14) 5523 verbose stack at emitTwo (events.js:106:13) 5523 verbose stack at ChildProcess.emit (events.js:194:7) 5523 verbose stack at maybeClose (internal/child_process.js:899:16) 5523 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5) 5524 verbose pkgid [email protected] 5525 verbose cwd /home/vagrant/dev/flowtify-backend 5526 error Linux 3.2.0-23-generic 5527 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "bcrypt" 5528 error node v7.8.0 5529 error npm v4.2.0 5530 error code ELIFECYCLE 5531 error errno 1 5532 error [email protected] install:node-pre-gyp install --fallback-to-build 5532 error Exit status 1 5533 error Failed at the [email protected] install script 'node-pre-gyp install --fallback-to-build'. 5533 error Make sure you have the latest version of node.js and npm installed. 5533 error If you do, this is most likely a problem with the bcrypt package, 5533 error not with npm itself. 5533 error Tell the author that this fails on your system: 5533 error node-pre-gyp install --fallback-to-build 5533 error You can get information on how to open an issue for this project with: 5533 error npm bugs bcrypt 5533 error Or if that isn't available, you can get their info via: 5533 error npm owner ls bcrypt 5533 error There is likely additional logging output above. 5534 verbose exit [ 1, true ]

@anhquande ubuntu 12.04 is very old and does not contain a compliant g++ compiler (nodejs requires a c++11 compiler). You should install gcc-4.9 or higher

need >gcc-4.9
centos7:
yum -y install gcc gcc-c++ kernel-devel;
wget ftp://gcc.gnu.org/pub/gcc/releases/gcc-4.9.0/gcc-4.9.0.tar.bz2;
yum install -y glibc-static libstdc++-static;
yum install gcc gcc-c++;
tar jxvf gcc-4.9.0.tar.bz2 -C /usr/local/src;
cd /usr/local/src/gcc-4.9.0;
./contrib/download_prerequisites;
cd /usr/local/build/gcc-4.9.0;
/usr/local/src/gcc-4.9.0/configure --enable-checking=release --enable-languages=c,c++ --disable-multilib;
make -j4;
make install;

+1 on ubuntu 16
zodern/meteor-up/issues/683

Suddenly broken on my centos container when it was working ~ 1 week ago. IMHO there needs to be a working binary distro for it to be suitable for use in production. Appreciate this is not easy to achieve. Installing GCC and make in all my production containers not an option for me, and building a separate deployment process outside of npm would be insane.

FYI for any future people, upgrading from node v4 to v8 fixed this for me.

Install this globally to make the node-red-admin command available on your path:

npm install -g node-red-admin

Note: you may need to run this with sudo, or from within an Administrator command

shell.

Then use

node-red-admin hash-pw

tool will prompt you for password:

password : abcd1234

$2a$08$ExBqI41sd5ythjkkkklref/6loiiAanRK.we8Zou0H3vMhUXiOfmq

Had this issue with node 10. Switched to node 9 and had no issue.

I've got this issue with node 10 too

@matthew1534 - just in case, worth checking there is no typo in your install command, I had misspelled bcrypt!

@oshihirii thanks but it's not that.

Here is the console output:

$ npm i bcrypt

> [email protected] install /Users/mp/node-js-platform/node_modules/bcrypt
> node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v2.0.1/bcrypt_lib-v2.0.1-node-v64-darwin-x64-unknown.tar.gz 
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI, unknown) (falling back to source compile with node-gyp) 
  CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
  CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt.o
  CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt_node.o
../src/bcrypt_node.cc:66:21: warning: 'Utf8Value' is deprecated [-Wdeprecated-declarations]
  String::Utf8Value value(str);
                    ^
/Users/mp/.node-gyp/10.0.0/include/node/v8.h:2821:5: note: 'Utf8Value' has been explicitly marked deprecated here
    V8_DEPRECATED("Use Isolate version",
    ^
/Users/mp/.node-gyp/10.0.0/include/node/v8config.h:321:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
1 warning generated.
  SOLINK_MODULE(target) Release/bcrypt_lib.node
  COPY /Users/mp/node-js-platform/node_modules/bcrypt/lib/binding/bcrypt_lib.node
  TOUCH Release/obj.target/action_after_build.stamp
+ [email protected]
updated 1 package in 7.217s

Same issue on Ubuntu 16.04.
I try install node-pre-gyp globally, it works, but when I try to use the package it show the error below:

[email protected] install /home/abu-gasiem/development/jaafar/p6p-api/node_modules/bcrypt
node-pre-gyp install --fallback-to-build

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-ia32.tar.gz
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)
make: Entering directory '/home/abu-gasiem/development/jaafar/p6p-api/node_modules/bcrypt/build'
CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt.o
CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt_node.o
SOLINK_MODULE(target) Release/obj.target/bcrypt_lib.node
COPY Release/bcrypt_lib.node
COPY /home/abu-gasiem/development/jaafar/p6p-api/node_modules/bcrypt/lib/binding/bcrypt_lib.node
TOUCH Release/obj.target/action_after_build.stamp
make: Leaving directory '/home/abu-gasiem/development/jaafar/p6p-api/node_modules/bcrypt/build'
npm WARN [email protected] requires a peer of react@^0.14.0 || ^15.0.0-rc but none was installed.
npm WARN [email protected] requires a peer of react-dom@^0.14.0 || ^15.0.0-rc but none was installed.

added 70 packages in 17.779s

@mohammedabualsoud It is not an error. Library installs properly. https://github.com/kelektiv/node.bcrypt.js/wiki/Installation-Instructions

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alanosman picture alanosman  路  3Comments

targos picture targos  路  4Comments

surendra172001 picture surendra172001  路  5Comments

amjedomar picture amjedomar  路  5Comments

youngrrrr picture youngrrrr  路  5Comments