my nodejs version is 12.13.1
C:\Users\鞁滉步\Documents\GitHub\WebProject>npm i bcrypt
[email protected] 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 [email protected] and [email protected] (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-gypgypgyp_main.py", line 50, in
sys.exit(gyp.script_main())
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gypgyp\pylibgyp__init__.py", line
554, in script_main
return main(sys.argv[1:])
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gypgyp\pylibgyp__init__.py", line
547, in main
return gyp_main(args)
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gypgyp\pylibgyp__init__.py", line
523, in gyp_main
options.duplicate_basename_check)
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gypgyp\pylibgyp__init__.py", line
139, in Load
params['parallel'], params['root_targets'])
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gypgyp\pylibgyp\input.py", line 277
9, in Load
variables, includes, depth, check, True)
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gypgyp\pylibgyp\input.py", line 391
, in LoadTargetBuildFile
includes, True, check)
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gypgyp\pylibgyp\input.py", line 263
, in LoadOneBuildFile
aux_data, includes, check)
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gypgyp\pylibgyp\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-gypgyp\pylibgyp\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-
gyplib\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\bcryptlib\binding\bcrypt_lib.node --module_name=bcrypt_
lib --module_path=C:\Users\鞁滉步\Documents\GitHub\WebProject\node_modules\bcryptlib\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.
modules\node-pre-gyplib\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\bcryptlib\binding\bcrypt_lib.node --module_name=bcrypt_lib --module_path=C:\Users\鞁滉步
\Documents\GitHub\WebProject\node_modules\bcryptlib\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: [email protected] (node_modulesfsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"dar
win","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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??
same here
You might be missing some dependencies. Try this.
Try installing the prior version, worked for me:
npm i [email protected]
@MatthewRandle it works, thank you
@MatthewRandle thanks brow, works for me!
@MatthewRandle works for me too. Thanks
@MatthewRandle It works
can't install even 3.0.6 version
and updating windows tools not helping...
@MatthewRandle thanks bro, its work for me to
good day and Merry Christmas, I guess you can close this? kindly
npm install --global --production windows-build-tools
Font : https://github.com/kelektiv/node.bcrypt.js/wiki/Installation-Instructions
@MatthewRandle not work @3.0.6. help me
@MatthewRandle thanks bro, its work for me
Thanks, bro, it now works
try with this version ...its working
npm i [email protected]
@MatthewRandle thanks so much, it works for me (Windows 10, node 10.16.3, npm 6.9.0)
@MatthewRandle not work @3.0.6. help me
Your node_modules folder is corrupt. To resolve this, follow the steps below
rm -rf node_modules to remove your node modules foldernpm install to reinstall other dependenciesnpm i [email protected] to install bcrypt@MatthewRandle it worked for me. Thanks a ton man!! i was stuck on this problem from past two days.
Please try this it will definitely work, this error occurs because you are not using a stable version of node
npm install --save bcryptjs && npm uninstall --save bcrypt
Try installing the prior version, worked for me:
npm i [email protected]
Thanks!! Its works. The problem are the version.
This npm i [email protected] is working for me, thanks
sudo npm i --unsafe-perm
after that install bcrypt
it works for me for ubuntu 18.04
I fixed this by adding 'sudo' - sudo npm install bcrypt
Most helpful comment
Try installing the prior version, worked for me:
npm i [email protected]