bcrypt@1.0.3 install: `node

While installing bcrypt I'm getting this error in my windows machine, I'm using

  • node v8.9.4
  • npm v5.6.0
  • bcrypt v1.0.3
  • C:UsersuserDesktopmysql_node_apiregister_loginregister_login>npm install bcrypt --save > bcrypt@1.0.3 install C:UsersuserDesktopmysql_node_apiregister_loginregis ter_loginnode_modulesbcrypt > node-pre-gyp install --fallback-to-build node-pre-gyp ERR! Tried to download(undefined): https://github.com/kelektiv/node .bcrypt.js/releases/download/v1.0.3/bcrypt_lib-v1.0.3-node-v57-win32-x64.tar.gz node-pre-gyp ERR! Pre-built binaries not found for bcrypt@1.0.3 and node@8.9.4 ( node-v57 ABI) (falling back to source compile with node-gyp) gyp ERR! configure error gyp ERR! stack Error: Can't find Python executable "python", you can set the PYT HON env variable. gyp ERR! stack at PythonFinder.failNoPython (C:UsersuserAppDataRoamingn pmnode_modulesnpmnode_modulesnode-gyplibconfigure.js:483:19) gyp ERR! stack at PythonFinder. (C:UsersuserAppDataRoamingnp mnode_modulesnpmnode_modulesnode-gyplibconfigure.js:508:16) gyp ERR! stack at C:UsersuserAppDataRoamingnpmnode_modulesnpmnode_mo dulesgraceful-fspolyfills.js:284:29 gyp ERR! stack at FSReqWrap.oncomplete (fs.js:152:21) gyp ERR! System Windows_NT 6.1.7601 gyp ERR! command "C:Program Filesnodejsnode.exe" "C:UsersuserAppData Roamingnpmnode_modulesnpmnode_modulesnode-gypbinnode-gyp.js" "co nfigure" "--fallback-to-build" "--module=C:UsersuserDesktopmysql_node_ap iregister_loginregister_loginnode_modulesbcryptlibbindingbcrypt_li b.node" "--module_name=bcrypt_lib" "--module_path=C:UsersuserDesktopmysq l_node_apiregister_loginregister_loginnode_modulesbcryptlibbinding" gyp ERR! cwd C:UsersuserDesktopmysql_node_apiregister_loginregister_login node_modulesbcrypt gyp ERR! node -v v8.9.4 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok node-pre-gyp ERR! build error node-pre-gyp ERR! stack Error: Failed to execute 'C:Program Filesnodejsnode.e xe C:UsersuserAppDataRoamingnpmnode_modulesnpmnode_modulesnode-gypbin node-gyp.js configure --fallback-to-build --module=C:UsersuserDesktopmysql_n ode_apiregister_loginregister_loginnode_modulesbcryptlibbindingbcrypt_lib .node --module_name=bcrypt_lib --module_path=C:UsersuserDesktopmysql_node_ap iregister_loginregister_loginnode_modulesbcryptlibbinding' (1) node-pre-gyp ERR! stack at ChildProcess. (C:UsersuserDesktopm ysql_node_apiregister_loginregister_loginnode_modulesnode-pre-gyplibutilc ompile.js:83:29) node-pre-gyp ERR! stack at emitTwo (events.js:126:13) node-pre-gyp ERR! stack at ChildProcess.emit (events.js:214:7) node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:925:16) node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/chi ld_process.js:209:5) node-pre-gyp ERR! System Windows_NT 6.1.7601 node-pre-gyp ERR! command "C:Program Filesnodejsnode.exe" "C:Usersuser Desktopmysql_node_apiregister_loginregister_loginnode_modulesnode-pr e-gypbinnode-pre-gyp" "install" "--fallback-to-build" node-pre-gyp ERR! cwd C:UsersuserDesktopmysql_node_apiregister_loginregist er_loginnode_modulesbcrypt node-pre-gyp ERR! node -v v8.9.4 node-pre-gyp ERR! node-pre-gyp -v v0.6.36 node-pre-gyp ERR! not ok Failed to execute 'C:Program Filesnodejsnode.exe C:UsersuserAppDataRoamin gnpmnode_modulesnpmnode_modulesnode-gypbinnode-gyp.js configure --fallbac k-to-build --module=C:UsersuserDesktopmysql_node_apiregister_loginregister _loginnode_modulesbcryptlibbindingbcrypt_lib.node --module_name=bcrypt_lib --module_path=C:UsersuserDesktopmysql_node_apiregister_loginregister_login node_modulesbcryptlibbinding' (1) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! bcrypt@1.0.3 install: node-pre-gyp install --fallback-to-build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the bcrypt@1.0.3 install script. npm ERR!

    This is probably not a problem with npm. There is likely additional log ging output above. npm ERR! A complete log of this run can be found in: npm ERR! C:UsersuserAppDataRoamingnpm-cache_logs2018-02-25T14_42_29_5 29Z-debug.log


    Finally after many research I solve this problem. So, guys those who are facing this problem just do the below processes,

    I just installed python and set the environment variables now it's working perfect for me.

  • Install Python (while installing in windows you can get the option for add path in environment variables, just tick the check box or else)
  • Set the path in environment variables
  • Now store the downloaded python.exe file in this directory "c:Python27python.exe"
  • Now run this cmd in terminal npm config set python "c:Python27python.exe"
  • Now do npm install or run your project. I think now your problem is solved. :-)

    链接地址: http://www.djcxy.com/p/96132.html

    上一篇: f2py的问题:未定义的子程序中的模块引用

    下一篇: bcrypt@1.0.3安装:`节点