kelektiv / node.bcrypt.js

bcrypt for NodeJs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

installataion error

Ramone31 opened this issue · comments

when i try to install bcrypt version 5 or below ,it not install for node js version 14.it show error like this

node-pre-gyp WARN Pre-built binaries not installable for bcrypt@5.1.1 and node@10.19.0 (node-v64 ABI, glibc) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error ENOENT: no such file or directory, mkdir
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '//node_modules/bcrypt/build'
gyp ERR! System Linux 5.4.0-56-generic
gyp ERR! command "/usr/bin/node" "/usr/bin/node-gyp" "configure" "--fallback-to-build" "--module=//node_modules/bcrypt/lib/binding/napi-v3/bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=//node_modules/bcrypt/lib/binding/napi-v3" "--napi_version=5" "--node_abi_napi=napi" "--napi_build_version=3" "--node_napi_label=napi-v3"
gyp ERR! cwd //node_modules/bcrypt
gyp ERR! node -v v10.19.0
gyp ERR! node-gyp -v v6.1.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/bin/node-gyp configure --fallback-to-build --module=//node_modules/bcrypt/lib/binding/napi-v3/bcrypt_lib.node --module_name=bcrypt_lib --module_path=//node_modules/bcrypt/lib/binding/napi-v3 --napi_version=5 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
node-pre-gyp ERR! stack at ChildProcess.cmd.on (//node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:198:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:982:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
node-pre-gyp ERR! System Linux 5.4.0-56-generic
node-pre-gyp ERR! command "/usr/bin/node" "//node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd //node_modules/bcrypt
node-pre-gyp ERR! node -v v10.19.0
node-pre-gyp ERR! node-pre-gyp -v v1.0.11
node-pre-gyp ERR! not ok
Failed to execute '/usr/bin/node /usr/bin/node-gyp configure --fallback-to-build --module=//node_modules/bcrypt/lib/binding/napi-v3/bcrypt_lib.node --module_name=bcrypt_lib --module_path=//node_modules/bcrypt/lib/binding/napi-v3 --napi_version=5 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
npm WARN argus_sv2@1.0.0 No description
npm WARN argus_sv2@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.3 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bcrypt@5.1.1 install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bcrypt@5.1.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! /root/.npm/_logs/2024-01-02T08_19_53_217Z-debug.log

Currently using Node version 20.9 and I had this issue.
Thought it was just an issue with my computer.

not a PC problem i updated node js version it works but i use node js version 14 it does not work

Yeah mine fails too, bcrypt issue

Screenshot from 2024-03-07 16-22-04

am also faciing the same issue, I have Ubuntu 20.04 LTS and Node.js 20.11.1 and npm 10.2.4

Screenshot from 2024-03-07 16-22-04

am also faciing the same issue, I have Ubuntu 20.04 LTS and Node.js 20.11.1 and npm 10.2.4

I tried installing sudo npm install -g node-gyp and then retried to install bcrypt, still it didn't worked.

Screenshot from 2024-03-07 16-22-04
am also faciing the same issue, I have Ubuntu 20.04 LTS and Node.js 20.11.1 and npm 10.2.4

I tried installing sudo npm install -g node-gyp and then retried to install bcrypt, still it didn't worked.

Can report the same on Ubuntu 22 with node 20.

I've been able to work around the issue by cloning this repo and building and installing locally:

mkdir ~/git && cd ~/git
git clone https://github.com/kelektiv/node.bcrypt.js.git
cd node.bcrypt.js
make
cd ~/myproject
npm install ~/git/node.bcrypt.js