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

Failed at the bcrypt@1.0.2 install #476

Closed
abhijitpadhi opened this issue Jan 11, 2017 · 70 comments
Closed

Failed at the bcrypt@1.0.2 install #476

abhijitpadhi opened this issue Jan 11, 2017 · 70 comments

Comments

@abhijitpadhi
Copy link

  • What went wrong: Failed at the bcrypt@0.8.7 install script 'node-gyp rebuild'.

  • What did you expect to happen: npm install bcrypt --g

  • Which version of nodejs: node@6.9.4 and OS: Windows 8

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

bcrypt@1.0.2 install C:\Users\MY\AppData\Roaming\npm\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-win32-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for bcrypt@1.0.2 and node@6.9.4 (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\npm\node_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\npm\node_modules\node-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\npm\node_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 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' (1)
node-pre-gyp ERR! stack at ChildProcess. (C:\Users\MY\AppData\Roaming\npm\node_modules\bcrypt\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 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\npm\node_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 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' (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! bcrypt@1.0.2 install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bcrypt@1.0.2 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

@Smert
Copy link

Smert commented Jan 11, 2017

#467

@antwal
Copy link

antwal commented Jan 11, 2017

Hi,

same problem on OSX:

$ npm i bcrypt --save

bcrypt@1.0.2 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 bcrypt@1.0.2 and node@6.9.1 (node-v48 ABI) (falling back to source compile with node-gyp)

@recrsn
Copy link
Collaborator

recrsn commented Jan 12, 2017

Please install compilers and pre-requisites for your systems.

@antwal
Copy link

antwal commented Jan 12, 2017

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.

@antwal
Copy link

antwal commented Jan 12, 2017

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.

@BenReilly
Copy link

@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

@antwal
Copy link

antwal commented Jan 12, 2017

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

@paulossilva
Copy link

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

@antwal
Copy link

antwal commented Jan 13, 2017

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

@joshjg
Copy link

joshjg commented Jan 15, 2017

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.

@jeneser
Copy link

jeneser commented Jan 18, 2017

Hi,

same problem on Ubuntu16.04 x64:

> bcrypt@1.0.2 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 bcrypt@1.0.2 and node@6.9.2 (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 fsevents@1.0.17: 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! bcrypt@1.0.2 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the bcrypt@1.0.2 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!

@jeneser
Copy link

jeneser commented Jan 19, 2017

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!

@recrsn
Copy link
Collaborator

recrsn commented Jan 20, 2017

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.

@jdarling
Copy link

jdarling commented Jan 20, 2017

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.

paglias added a commit to HabitRPG/habitica that referenced this issue Jan 24, 2017
* start migrating to bcrypt

* added method to convert the password to bcrypt when logging in, added method to compare password without knowing the hashing algorhytm, remove default

* travis: try to upgrade to container based infrastructure

* travis: add deps to build bcrypt.js

* travis: add deps to build bcrypt.js

* travis: add deps to build bcrypt.js

* travis: add deps to build bcrypt.js

* use bcryptjs until bcrypt can be installed on travis, see kelektiv/node.bcrypt.js#476

* correct sha1 unit tests

* try different mongodb repo

* try without mognodb services

* try again with bcrypt

* disable request logging in travis

* migrate missing routes

* simplify code

* remove bcryptjs

* fix typo

* fix typo

* fix typo in comment

* add unit tests for new passwords utility emthods

* travis: back to old infrastructure, containers often have timeouts

* add integration test for passwordHashMethod

* update shrinkwrap

* clarify code and add comments

* add integration tests

* fix linting

* fix integration tests
phillipthelen pushed a commit to phillipthelen/habitrpg that referenced this issue Jan 25, 2017
* start migrating to bcrypt

* added method to convert the password to bcrypt when logging in, added method to compare password without knowing the hashing algorhytm, remove default

* travis: try to upgrade to container based infrastructure

* travis: add deps to build bcrypt.js

* travis: add deps to build bcrypt.js

* travis: add deps to build bcrypt.js

* travis: add deps to build bcrypt.js

* use bcryptjs until bcrypt can be installed on travis, see kelektiv/node.bcrypt.js#476

* correct sha1 unit tests

* try different mongodb repo

* try without mognodb services

* try again with bcrypt

* disable request logging in travis

* migrate missing routes

* simplify code

* remove bcryptjs

* fix typo

* fix typo

* fix typo in comment

* add unit tests for new passwords utility emthods

* travis: back to old infrastructure, containers often have timeouts

* add integration test for passwordHashMethod

* update shrinkwrap

* clarify code and add comments

* add integration tests

* fix linting

* fix integration tests
@Thyxx
Copy link

Thyxx commented Jan 26, 2017

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

@teckays
Copy link

teckays commented Jan 27, 2017

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

@dfrnks
Copy link

dfrnks commented Jan 27, 2017

The link https://github.com/kelektiv/node.bcrypt.js/releases/download/v1.0.2/bcrypt_lib-v1.0.2-node-v48-linux-x64.tar.gz what he try to download don't exist.

@net5566
Copy link

net5566 commented Jan 28, 2017

same here
plz fix the link
https://github.com/kelektiv/node.bcrypt.js/releases/download/v1.0.2/bcrypt_lib-v1.0.2-node-v48-linux-x64.tar.gz

@g19fanatic
Copy link

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?

@anhquande
Copy link

Please fix the link.

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

@ryaneghrari
Copy link

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

@rahman
Copy link

rahman commented Feb 2, 2017

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

@seonman
Copy link

seonman commented Feb 3, 2017

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

@recrsn
Copy link
Collaborator

recrsn commented Feb 3, 2017

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

@shivarajnaidu
Copy link

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

> bcrypt@1.0.2 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 bcrypt@1.0.2 and node@6.10.0 (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

@shivarajnaidu
Copy link

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

@antwal
Copy link

antwal commented Feb 27, 2017

@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

@shivarajnaidu
Copy link

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...???

@newdesignideas
Copy link

@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.

> bcrypt@1.0.2 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 bcrypt@1.0.2 and node@4.7.3 (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! bcrypt@1.0.2 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bcrypt@1.0.2 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

@antwal
Copy link

antwal commented Mar 1, 2017

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

@chris-guidry
Copy link

chris-guidry commented Mar 2, 2017

@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.

@antwal
Copy link

antwal commented Mar 3, 2017

@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

@johngtrs
Copy link

johngtrs commented Mar 11, 2017

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"

@shivarajnaidu
Copy link

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

@dotspencer
Copy link

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

@anhquande
Copy link

anhquande commented Apr 12, 2017

@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 fsevents@1.1.1: 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: bcrypt@1.0.2 install: node-pre-gyp install --fallback-to-build5523 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 bcrypt@1.0.2 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 bcrypt@1.0.2 install:node-pre-gyp install --fallback-to-build5532 error Exit status 1 5533 error Failed at the bcrypt@1.0.2 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 ]

@recrsn
Copy link
Collaborator

recrsn commented Apr 12, 2017

@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

@xnathanh
Copy link

xnathanh commented Apr 18, 2017

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;

@LazerJesus
Copy link

LazerJesus commented Aug 12, 2017

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

@softwareplumber
Copy link

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.

@williamoverton
Copy link

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

@abdulwaheedg
Copy link

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

@simpleshadow
Copy link

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

@matthew-petrie
Copy link

I've got this issue with node 10 too

@oshihirii
Copy link

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

@matthew-petrie
Copy link

@oshihirii thanks but it's not that.

Here is the console output:

$ npm i bcrypt

> bcrypt@2.0.1 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 bcrypt@2.0.1 and node@10.0.0 (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
+ bcrypt@2.0.1
updated 1 package in 7.217s

@mohammedabualsoud
Copy link

mohammedabualsoud commented Jun 21, 2018

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:

bcrypt@1.0.2 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 bcrypt@1.0.2 and node@8.0.0 (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 draft-js@0.10.1 requires a peer of react@^0.14.0 || ^15.0.0-rc but none was installed.
npm WARN draft-js@0.10.1 requires a peer of react-dom@^0.14.0 || ^15.0.0-rc but none was installed.

added 70 packages in 17.779s

@recrsn
Copy link
Collaborator

recrsn commented Jun 21, 2018

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

@kelektiv kelektiv locked as resolved and limited conversation to collaborators Jun 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests