node.bcrypt.js: can't install bcrypt.js
my nodejs version is 12.13.1
<error log>C:\Users\시경\Documents\GitHub\WebProject>npm i bcrypt
bcrypt@3.0.7 install C:\Users\시경\Documents\GitHub\WebProject\node_modules\bcrypt node-pre-gyp install --fallback-to-build
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v
3.0.7/bcrypt_lib-v3.0.7-node-v72-win32-x64-unknown.tar.gz
node-pre-gyp WARN Pre-built binaries not found for bcrypt@3.0.7 and node@12.13.1 (node-v72 ABI, unknown)
(falling back to source compile with node-gyp)
Traceback (most recent call last):
File “C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py”, line 50, in <mo
dule>
sys.exit(gyp.script_main())
File “C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp_init_.py”, line
554, in script_main
return main(sys.argv[1:])
File “C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp_init_.py”, line
547, in main
return gyp_main(args)
File “C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp_init_.py”, line
523, in gyp_main
options.duplicate_basename_check)
File “C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp_init_.py”, line
139, in Load
params[‘parallel’], params[‘root_targets’])
File “C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\input.py”, line 277
9, in Load
variables, includes, depth, check, True)
File “C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\input.py”, line 391
, in LoadTargetBuildFile
includes, True, check)
File “C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\input.py”, line 263
, in LoadOneBuildFile
aux_data, includes, check)
File “C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\input.py”, line 300
, in LoadBuildFileIncludesIntoDict
LoadOneBuildFile(include, data, aux_data, None, False, check),
File “C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\input.py”, line 233
, in LoadOneBuildFile
build_file_contents = open(build_file_path, ‘rU’).read()
UnicodeDecodeError: ‘cp949’ codec can’t decode byte 0xec in position 2398: illegal multibyte sequence
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-
gyp\lib\configure.js:351:16)
gyp ERR! stack at ChildProcess.emit (events.js:210:5)
gyp ERR! stack at Process.ChildProcess.handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Windows_NT 10.0.18362
gyp ERR! command “C:\Program Files\nodejs\node.exe” “C:\Program Files\nodejs\node_modules\npm\no
de_modules\node-gyp\bin\node-gyp.js” “configure” “–fallback-to-build” “–module=C:\Users\시경\Doc
uments\GitHub\WebProject\node_modules\bcrypt\lib\binding\bcrypt_lib.node” “–module_name=bcrypt_l
ib” “–module_path=C:\Users\시경\Documents\GitHub\WebProject\node_modules\bcrypt\lib\binding” "
–napi_version=5" “–node_abi_napi=napi” “–napi_build_version=0” “–node_napi_label=node-v72” “–python
=C:\Users\시경\.windows-build-tools\python27\python.exe”
gyp ERR! cwd C:\Users\시경\Documents\GitHub\WebProject\node_modules\bcrypt
gyp ERR! node -v v12.13.1
gyp ERR! node-gyp -v v5.0.5
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\node
js\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\User
s\시경\Documents\GitHub\WebProject\node_modules\bcrypt\lib\binding\bcrypt_lib.node --module_name=bcrypt
lib --module_path=C:\Users\시경\Documents\GitHub\WebProject\node_modules\bcrypt\lib\binding --napi_versi
on=5 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72 --python=C:\Users\시경.wind
ows-build-tools\python27\python.exe’ (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\Users\시경\Documents\GitHub\WebProject\node_
modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:210:5)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
node-pre-gyp ERR! System Windows_NT 10.0.18362
node-pre-gyp ERR! command “C:\Program Files\nodejs\node.exe” “C:\Users\시경\Documents\GitHub\Web
Project\node_modules\node-pre-gyp\bin\node-pre-gyp” “install” “–fallback-to-build”
node-pre-gyp ERR! cwd C:\Users\시경\Documents\GitHub\WebProject\node_modules\bcrypt
node-pre-gyp ERR! node -v v12.13.1
node-pre-gyp ERR! node-pre-gyp -v v0.13.0
node-pre-gyp ERR! not ok
Failed to execute ‘C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_module
s\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\시경\Documents\GitHub\WebProj
ect\node_modules\bcrypt\lib\binding\bcrypt_lib.node --module_name=bcrypt_lib --module_path=C:\Users\시경
\Documents\GitHub\WebProject\node_modules\bcrypt\lib\binding --napi_version=5 --node_abi_napi=napi --nap
i_build_version=0 --node_napi_label=node-v72 --python=C:\Users\시경.windows-build-tools\python27\python
.exe’ (1)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {“os”:“dar
win”,“arch”:“any”} (current: {“os”:“win32”,“arch”:“x64”})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bcrypt@3.0.7 install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bcrypt@3.0.7 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\시경\AppData\Roaming\npm-cache_logs\2019-11-20T06_33_00_278Z-debug.log
how can i do??
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 6
- Comments: 26
Try installing the prior version, worked for me:
npm i bcrypt@3.0.6You might be missing some dependencies. Try this.
✔️
npm install --save bcryptjsis worked for meYour node_modules folder is corrupt. To resolve this, follow the steps below
rm -rf node_modulesto remove your node modules foldernpm installto reinstall other dependenciesnpm i bcrypt@3.0.6to install bcrypttry with this version …its working
npm i bcrypt@3.0.6