node.bcrypt.js icon indicating copy to clipboard operation
node.bcrypt.js copied to clipboard

can't install bcrypt.js

Open kymkim96 opened this issue 7 years ago • 26 comments

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-gyp\gyp\gyp_main.py", line 50, in 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. (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: [email protected] (node_modules\fsevents): 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??

kymkim96 avatar Nov 20 '19 06:11 kymkim96

same here

avillarubia avatar Nov 20 '19 13:11 avillarubia

You might be missing some dependencies. Try this.

dobromiryor avatar Nov 20 '19 14:11 dobromiryor

Try installing the prior version, worked for me:

npm i [email protected]

MatthewRandle avatar Nov 20 '19 15:11 MatthewRandle

@MatthewRandle it works, thank you

avillarubia avatar Nov 20 '19 15:11 avillarubia

@MatthewRandle thanks brow, works for me!

fafa1 avatar Nov 26 '19 02:11 fafa1

@MatthewRandle works for me too. Thanks

mokoweb avatar Nov 26 '19 12:11 mokoweb

@MatthewRandle It works

madushanka2016 avatar Dec 13 '19 10:12 madushanka2016

can't install even 3.0.6 version and updating windows tools not helping...

olegs7771 avatar Dec 22 '19 07:12 olegs7771

@MatthewRandle thanks bro, its work for me to

adam034 avatar Dec 23 '19 02:12 adam034

good day and Merry Christmas, I guess you can close this? kindly

avillarubia avatar Dec 26 '19 03:12 avillarubia

npm install --global --production windows-build-tools

Font : https://github.com/kelektiv/node.bcrypt.js/wiki/Installation-Instructions

juanchehin avatar Dec 26 '19 12:12 juanchehin

@MatthewRandle not work @3.0.6. help me

SoundarrajanK avatar Dec 30 '19 05:12 SoundarrajanK

@MatthewRandle thanks bro, its work for me

nilearshad avatar Dec 31 '19 10:12 nilearshad

Thanks, bro, it now works

vjainlion avatar Jan 01 '20 11:01 vjainlion

try with this version ...its working npm i [email protected]

satywanKumar avatar Jan 06 '20 14:01 satywanKumar

@MatthewRandle thanks so much, it works for me (Windows 10, node 10.16.3, npm 6.9.0)

stefkwan avatar Jan 07 '20 03:01 stefkwan

@MatthewRandle not work @3.0.6. help me

Your node_modules folder is corrupt. To resolve this, follow the steps below

  1. Delete your package-lock.json file
  2. run rm -rf node_modules to remove your node modules folder
  3. run npm install to reinstall other dependencies
  4. run npm i [email protected] to install bcrypt

azeezat avatar Jan 09 '20 11:01 azeezat

@MatthewRandle it worked for me. Thanks a ton man!! i was stuck on this problem from past two days.

pallavikamboj123 avatar Jan 12 '20 16:01 pallavikamboj123

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

krishheii avatar Jan 12 '20 17:01 krishheii

Try installing the prior version, worked for me:

npm i [email protected]

Thanks!! Its works. The problem are the version.

leonardonicolassimes avatar Jan 14 '20 20:01 leonardonicolassimes