1

I want to use bcrypt for salts and hashing when I use NPM to try to install I get the following error.

gyp ERR! configure error
gyp ERR! stack error spawn ENOENT
gyp ERR! stack   at errnoException <child_process.js:1001:11>
gyp ERR! stack   at process.childProcess._handle.oneexit<child_process.js.792:34>

gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "c:\program files\nodejs\\node_modules\\npm\\node_modules\\node-        gyp\\bin\\node-gyp.js"
gyp ERR! cwd C:\Users\jfdfdf\desktop\tntw_wip\API\node_modules\bcrypt
gyp ERR! node -v v 0.10.33
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok

gyp ERR! bcrypt 0.8.0.33
gyp ERR! Exit status 1
gyp ERR!
gyp ERR! Failed at the bcrypt install
gyp ERR! this is most likely a problem with the bcrypt package
gyp ERR! not with npm itself
gyp ERR! tell the author that this fails on your system
gyp ERR!    node-gyp rebuild
gyp ERR! you can get their info via;
gyp ERR!   npm owner is bcrypt
gyp ERR! there is likely additional loggin info above
gyp ERR! system Windows_NT 6.1.7601
gyp ERR! command "C:\\Program files\\node.js\\\\node.exe" "C:\\program files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "bcrypt"
gyp ERR! cwd C:\users\jfdfdf\Desktop\tntw_wip\API
gyp ERR! node -v v0.10.33
gyp ERR! npm -v 1.4.28
gyp ERR! code ELIFECYCLE

I have python installed, gyp installed, current version of node and npm, open ssl, C++, and the SDK needed. I am drilling into the API folder of the project and using shift right click to open my command window to do all of my installs. the environment I am using is windows 7 professional and I am working in brackets.

I have searched and followed several solutions on this issue on both stack and the bcrypt page itself, nothing works. I am new to node other than using NPM to install stuff, so any help with this would be appreciated.

Guyute
  • 149
  • 2
  • 13

1 Answers1

1

If you're installing bcryptlocally and then simply uploading your entire codebase (including your node_modules folder) then it's likely a mis-match between the OS and your version of gyp and/or bcrypt.

If you're not already doing so, try excluding any node modules from your repo and running npm install on the server for each deployment, which should automatically pull the correct dependencies depending on the host OS.

AJB
  • 7,389
  • 14
  • 57
  • 88