3
votes

I am try to install nodejs bcrypt module on window 7 32-bit version.I have installed g++ and openSSL

C:\mystore>npm install -g bcrypt
npm http GET https://registry.npmjs.org/bcrypt
npm http 304 https://registry.npmjs.org/bcrypt
npm http GET https://registry.npmjs.org/bindings/1.0.0
npm http 304 https://registry.npmjs.org/bindings/1.0.0

[email protected] install C:\Users\Rajesh\AppData\Roaming\npm\node_modules\bcrypt node-gyp rebuild

C:\Users\Rajesh\AppData\Roaming\npm\node_modules\bcrypt>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild

gyp ERR! configure error
gyp ERR! stack Error: spawn ENOENT
gyp ERR! stack     at errnoException (child_process.js:980:11) gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:771:

34) gyp ERR! System Windows_NT 6.1.7600 gyp ERR! command "node" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"

gyp ERR! cwd C:\Users\Rajesh\AppData\Roaming\npm\node_modules\bcrypt
gyp ERR! node -v v0.10.20
gyp ERR! node-gyp -v v0.10.10
gyp ERR! not ok
npm ERR! weird error 1
npm ERR! not ok code 0

How to resolve it?

2

2 Answers

1
votes

Might I suggest bcryptjs instead?

https://www.npmjs.org/package/bcryptjs

This has absolutely no dependencies on anything whatesover (outside of node).

This would most likely help with installations across different environments as well

0
votes

Please check the link mentioned below for reference.

Basic Steps

  • Install Python 2.7.X (recommended)
  • Install Microsoft Visual Studio C++ 2012 for Windows Desktop (Express Version works well too)
  • Install node-gyp
  • Install Win64OpenSSL-100e.exe for 64-Bit and Win32OpenSSL-100e.exe for 32-Bit
  • Install brcypt module

http://vujade.co/nodejs-environment-setup-with-bcrypt-module/