node.bcrypt.js icon indicating copy to clipboard operation
node.bcrypt.js copied to clipboard

Please help me to solve this issue.

Open karnavpargi opened this issue 10 years ago • 1 comments

[email protected] install C:\Users\KARNAV\Desktop\hello\node_modules\bcrypt node-gyp rebuild

C:\Users\KARNAV\Desktop\hello\node_modules\bcrypt>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild ) gyp ERR! configure error gyp ERR! stack Error: Python executable "C:\Users\KARNAV\AppData\Local\Programs\Python\Python35-32\python.EXE" is v3.5.1, which is not supported by gyp. gyp ERR! stack You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0. gyp ERR! stack at failPythonVersion (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:406:14) gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:395:9 gyp ERR! stack at ChildProcess.exithandler (child_process.js:193:7) gyp ERR! stack at emitTwo (events.js:100:13) gyp ERR! stack at ChildProcess.emit (events.js:185:7) gyp ERR! stack at maybeClose (internal/child_process.js:850:16) gyp ERR! stack at Socket. (internal/child_process.js:323:11) gyp ERR! stack at emitOne (events.js:90:13) gyp ERR! stack at Socket.emit (events.js:182:7) gyp ERR! stack at Pipe._onclose (net.js:477:12) gyp ERR! System Windows_NT 10.0.10240 gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" gyp ERR! cwd C:\Users\KARNAV\Desktop\hello\node_modules\bcrypt gyp ERR! node -v v5.9.1 gyp ERR! node-gyp -v v3.3.1 gyp ERR! not ok npm WARN [email protected] requires a peer of kerberos@~0.0 but none was installed. npm WARN node-rest-auth@ No repository field. npm WARN node-rest-auth@ No license field. npm ERR! Windows_NT 10.0.10240 npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "bcrypt" npm ERR! node v5.9.1 npm ERR! npm v3.7.3 npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'. 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-gyp rebuild 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:\Users\KARNAV\Desktop\hello\npm-debug.log

karnavpargi avatar Apr 13 '16 08:04 karnavpargi

Karnav, you have two options, I think.

The more challenging path begins with a careful reading of the information under Dependencies on the project home page. It links to node-gyp, the build tool that creates the platform-specific binaries. That page does a very nice job of walking through what you need to do to get set up to build this module. Follow those instructions, then try again to install bcrypt. It worked for me just fine once I had node-gyp working.

The easier path is to use bcryptjs instead. It has the same API, is slower, but is pure JavaScript so installs with no unusual dependencies. This is what I chose for a web development class I'm teaching; your use of "hello" as the project name suggest you might be learning, too, in which case you probably don't need the top speed of the "real" bcrypt, at least not yet.

Hope that helps.

By the way, this is not actually an issue with bcrypt; just that the dependencies require software that isn't normally installed.

davidhbrown avatar Apr 14 '16 01:04 davidhbrown