kelektiv / node.bcrypt.js

bcrypt for NodeJs
MIT License
7.44k stars 512 forks source link

Unable to install on windows #857

Closed potts99 closed 3 years ago

potts99 commented 3 years ago

python 3.9 node v15.0.1 windows build 19042

npm ERR! code 1 npm ERR! path C:\Users\japot\Documents\GitHub\Peppermint\node_modules\bcrypt npm ERR! command failed npm ERR! command C:\Windows\system32\cmd.exe /d /s /c "node-gyp rebuild" npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@7.1.2 npm ERR! gyp info using node@15.0.1 | win32 | x64 npm ERR! gyp info find Python using Python version 3.9.0 found at "C:\Python39\python.exe" npm ERR! gyp info find VS using VS2019 (16.8.30717.126) found at: npm ERR! gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools" npm ERR! gyp info find VS run with --verbose for detailed information npm ERR! gyp info spawn C:\Python39\python.exe npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args 'C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py', npm ERR! gyp info spawn args 'binding.gyp', npm ERR! gyp info spawn args '-f', npm ERR! gyp info spawn args 'msvs', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args 'C:\Users\japot\Documents\GitHub\Peppermint\node_modules\bcrypt\build\config.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args 'C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\addon.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args 'C:\Users\japot\AppData\Local\node-gyp\Cache\15.0.1\include\node\common.gypi', npm ERR! gyp info spawn args '-Dlibrary=shared_library', npm ERR! gyp info spawn args '-Dvisibility=default', npm ERR! gyp info spawn args '-Dnode_root_dir=C:\Users\japot\AppData\Local\node-gyp\Cache\15.0.1', npm ERR! gyp info spawn args '-Dnode_gyp_dir=C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp', npm ERR! gyp info spawn args '-Dnode_lib_file=C:\\Users\\japot\\AppData\\Local\\node-gyp\\Cache\\15.0.1\\<(target_arch)\\node.lib', npm ERR! gyp info spawn args '-Dmodule_root_dir=C:\Users\japot\Documents\GitHub\Peppermint\node_modules\bcrypt', npm ERR! gyp info spawn args '-Dnode_engine=v8', npm ERR! gyp info spawn args '--depth=.', npm ERR! gyp info spawn args '--no-parallel', npm ERR! gyp info spawn args '--generator-output', npm ERR! gyp info spawn args 'C:\Users\japot\Documents\GitHub\Peppermint\node_modules\bcrypt\build', npm ERR! gyp info spawn args '-Goutput_dir=.' npm ERR! gyp info spawn args ] npm ERR! gyp: Undefined variable module_name in binding.gyp while trying to load binding.gyp npm ERR! gyp ERR! configure error npm ERR! gyp ERR! stack Error: gyp failed with exit code: 1 npm ERR! gyp ERR! stack at ChildProcess.onCpExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:351:16) npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:327:20) npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:277:12) npm ERR! gyp ERR! System Windows_NT 10.0.19042 npm ERR! 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" npm ERR! gyp ERR! cwd C:\Users\japot\Documents\GitHub\Peppermint\node_modules\bcrypt npm ERR! gyp ERR! node -v v15.0.1 npm ERR! gyp ERR! node-gyp -v v7.1.2 npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\japot\AppData\Local\npm-cache_logs\2021-02-21T11_33_12_462Z-debug.log

hefekranz commented 3 years ago

same issue, no problem with npm6 though...

potts99 commented 3 years ago

will try that thanks

hefekranz commented 3 years ago

also, removing and reinstalling worked for me under npm7. Didn't see any significant changes in the package-lock though :man_shrugging:

`--- a/package-lock.json +++ b/package-lock.json @@ -5221,6 +5221,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/bcrypt/-/bcrypt-5.0.0.tgz", "integrity": "sha512-jB0yCBl4W/kVHM2whjfyqnxTmOHkCX4kHEa5nYKSoGeYe8YrjTYTc87/6bwt1g8cmV0QrbhKriETg9jWtcREhg==",

Doc999tor commented 3 years ago

With npm 7.5.4 the install was unsuccessful After downgrading to npm 6 the installation worked successfully

recrsn commented 3 years ago

Should be fixed with v5.0.1