node.bcrypt.js: Unable to install

I’m unable to install bcrypt on my laptop. I recently upgraded my OS to windows 11 beta version. But I’m not sure if that actually affects the installation. I’m pasting the error I got on my command line. I guess I might have to update my VS CODE?

node-pre-gyp ERR! install response status 403 Forbidden on https://github.com/kelektiv/node.bcrypt.js/releases/download/v5.0.1/bcrypt_lib-v5.0.1-napi-v3-win32-x64-unknown.tar.gz node-pre-gyp WARN Pre-built binaries not installable for bcrypt@5.0.1 and node@14.17.3 (node-v83 ABI, unknown) (falling back to source compile with node-gyp) node-pre-gyp WARN Hit error response status 403 Forbidden on https://github.com/kelektiv/node.bcrypt.js/releases/download/v5.0.1/bcrypt_lib-v5.0.1-napi-v3-win32-x64-unknown.tar.gz gyp ERR! find VS gyp ERR! find VS msvs_version not set from command line or npm config gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer gyp ERR! find VS looking for Visual Studio 2015 gyp ERR! find VS - not found gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8 gyp ERR! find VS gyp ERR! find VS ************************************************************** gyp ERR! find VS You need to install the latest version of Visual Studio gyp ERR! find VS including the “Desktop development with C++” workload. gyp ERR! find VS For more information consult the documentation at: gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows gyp ERR! find VS ************************************************************** gyp ERR! find VS gyp ERR! configure error gyp ERR! stack Error: Could not find any Visual Studio installation to use gyp ERR! stack at VisualStudioFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47) gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16 gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:351:14) gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14 gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:372:16 gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7 gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16 gyp ERR! stack at ChildProcess.exithandler (child_process.js:326:5) gyp ERR! stack at ChildProcess.emit (events.js:375:28) gyp ERR! stack at maybeClose (internal/child_process.js:1055:16) gyp ERR! System Windows_NT 10.0.22000 gyp ERR! command “C:\Program Files\nodejs\node.exe” “C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js” “configure” “–fallback-to-build” “–module=C:\Users\prave\OneDrive\desktop\code-share-API\node_modules\bcrypt\lib\binding\napi-v3\bcrypt_lib.node” “–module_name=bcrypt_lib” “–module_path=C:\Users\prave\OneDrive\desktop\code-share-API\node_modules\bcrypt\lib\binding\napi-v3” “–napi_version=8” “–node_abi_napi=napi” “–napi_build_version=3” “–node_napi_label=napi-v3” gyp ERR! cwd C:\Users\prave\OneDrive\desktop\code-share-API\node_modules\bcrypt gyp ERR! node -v v14.17.3 gyp ERR! node-gyp -v v5.1.0 gyp ERR! not ok node-pre-gyp ERR! build error node-pre-gyp ERR! stack Error: Failed to execute ‘C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\prave\OneDrive\desktop\code-share-API\node_modules\bcrypt\lib\binding\napi-v3\bcrypt_lib.node --module_name=bcrypt_lib --module_path=C:\Users\prave\OneDrive\desktop\code-share-API\node_modules\bcrypt\lib\binding\napi-v3 --napi_version=8 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3’ (1) node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\Users\prave\OneDrive\Desktop\code-share-API\node_modules@mapbox\node-pre-gyp\lib\util\compile.js:89:23) node-pre-gyp ERR! stack at ChildProcess.emit (events.js:375:28) node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1055:16) node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) node-pre-gyp ERR! System Windows_NT 10.0.22000 node-pre-gyp ERR! command “C:\Program Files\nodejs\node.exe” “C:\Users\prave\OneDrive\Desktop\code-share-API\node_modules\@mapbox\node-pre-gyp\bin\node-pre-gyp” “install” “–fallback-to-build” node-pre-gyp ERR! cwd C:\Users\prave\OneDrive\desktop\code-share-API\node_modules\bcrypt node-pre-gyp ERR! node -v v14.17.3 node-pre-gyp ERR! node-pre-gyp -v v1.0.5 node-pre-gyp ERR! not ok Failed to execute ‘C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\prave\OneDrive\desktop\code-share-API\node_modules\bcrypt\lib\binding\napi-v3\bcrypt_lib.node --module_name=bcrypt_lib --module_path=C:\Users\prave\OneDrive\desktop\code-share-API\node_modules\bcrypt\lib\binding\napi-v3 --napi_version=8 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3’ (1) npm WARN code-share-API@1.0.0 No description npm WARN code-share-API@1.0.0 No repository field.

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! bcrypt@5.0.1 install: node-pre-gyp install --fallback-to-build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the bcrypt@5.0.1 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\prave\AppData\Roaming\npm-cache_logs\2021-09-20T22_59_03_931Z-debug.log

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 11
  • Comments: 17

Most upvoted comments

I’ve been able to get this to work for the moment by downgrading to 5.0.0

It was related to a bug with node-fetch used by node-pre-gyp. All solved now