Please help me to solve this issue.
[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.
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
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.