Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
PS C:\Users\Tyler\Documents\GitHub\tribot-stats\api> npm i
> bcrypt@3.0.0 install C:\Users\Tyler\Documents\GitHub\tribot-stats\api\node_modules\bcrypt
> node-pre-gyp install --fallback-to-build
node-pre-gyp WARN Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.0/bcrypt_lib-v3.0.0-node-v57-win32-x64-unknown.tar.gz
node-pre-gyp WARN Pre-built binaries not found for bcrypt@3.0.0 and node@8.11.1 (node-v57 ABI, unknown) (falling back to source compile with node-gyp)
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "C:\Users\Tyler\.windows-build-tools\python27\python.exe", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (C:\Users\Tyler\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack at PythonFinder.<anonymous> (C:\Users\Tyler\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack at C:\Users\Tyler\AppData\Roaming\npm\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Tyler\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\\Users\\Tyler\\Documents\\GitHub\\tribot-stats\\api\\node_modules\\bcrypt\\lib\\binding\\bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=C:\\Users\\Tyler\\Documents\\GitHub\\tribot-stats\\api\\node_modules\\bcrypt\\lib\\binding" "--napi_version=1" "--node_abi_napi=napi" "--python=C:\\Users\\Tyler\\.windows-build-tools\\python27\\python.exe" "--msvs_version=2015"
gyp ERR! cwd C:\Users\Tyler\Documents\GitHub\tribot-stats\api\node_modules\bcrypt
gyp ERR! node -v v8.11.1
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 Files\nodejs\node.exe C:\Users\Tyler\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\Tyler\Documents\GitHub\tribot-stats\api\node_modules\bcrypt\lib\binding\bcrypt_lib.node --module_name=bcrypt_lib --module_path=C:\Users\Tyler\Documents\GitHub\tribot-stats\api\node_modules\bcrypt\lib\binding --napi_version=1 --node_abi_napi=napi --python=C:\Users\Tyler\.windows-build-tools\python27\python.exe --msvs_version=2015' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\Users\Tyler\Documents\GitHub\tribot-stats\api\node_modules\bcrypt\node_modules\node-pre-gyp\lib\util\compile.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/child_process.js:209:5)
node-pre-gyp ERR! System Windows_NT 10.0.17134
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Tyler\\Documents\\GitHub\\tribot-stats\\api\\node_modules\\bcrypt\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\Tyler\Documents\GitHub\tribot-stats\api\node_modules\bcrypt
node-pre-gyp ERR! node -v v8.11.1
node-pre-gyp ERR! node-pre-gyp -v v0.10.2
node-pre-gyp ERR! not ok
Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\Tyler\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\Tyler\Documents\GitHub\tribot-stats\api\node_modules\bcrypt\lib\binding\bcrypt_lib.node --module_name=bcrypt_lib --module_path=C:\Users\Tyler\Documents\GitHub\tribot-stats\api\node_modules\bcrypt\lib\binding --napi_version=1 --node_abi_napi=napi --python=C:\Users\Tyler\.windows-build-tools\python27\python.exe --msvs_version=2015' (1)
npm WARN tslint@5.10.0 requires a peer of typescript@>=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev but none is installed. You must install peer dependencies yourself.
npm WARN tsutils@2.26.2 requires a peer of typescript@>=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >= 2.10.0-dev but none is installed. You must install peer dependencies yourself.
npm WARN tribot-api@1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bcrypt@3.0.0 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bcrypt@3.0.0 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\Tyler\AppData\Roaming\npm-cache\_logs\2018-07-09T16_01_22_764Z-debug.log
PS C:\Users\Tyler\Documents\GitHub\tribot-stats\api>
If you are using ubuntu, make sure you have the following packages installed:
apt-get install -y build-essentialor CentOS:
yum install gcc-c++ makeanother… https://nodejs.org/en/download/package-manager/
npm install --save bcryptjs && npm uninstall --save bcrypt 😄
Same problem here, installing on linux
This worked for me…
npm install --save bcrypt@3.0.6 --nodedir
@ihteshamqazi AFAIK:
bcrypt: is implemented in C++. Version 3+ doesn’t provide a pre-compiled version of it and therefore you need to have build tools installed to compile it. Although you don’t need them for deployment, you must ensure binary compatibility with your platform.bcryptjs: is a plain js implementation and therefore you don’t need anything. But it’s around 30% slower, as stated in docs.It’s up to you to use one of them. I use this one, because performance and security matters in this case.
Reverted to v2.0.1 for now. It would be good to get this issue solved as it’s been around for a while now and bcrypt is widely used.
Hey I think I ran into the same issue recently. If i understand the question you get that error when you try to run npm install bcrypt Well for me i tried npm install bcryptjs and it worked fine
npm install bcrypt@3.0.2
Pre-built binaries are now available for all supported platforms
After installing python 2.7 😕 Why isn’t all the necessary stuff is provided or listed to be downloaded to use this goddamn library? That’s just too many dependencies out of the nodejs environment which is supported to be noted or informed.
npm i node -gornpm i node-linux-x64 -gworkerd for me,Hi, can u please tell, whats the difference between bcrypt and bcryptjs.