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

installataion error

Open Ramone31 opened this issue 1 year ago • 7 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 [email protected] and [email protected] (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 [email protected] No description npm WARN [email protected] No repository field. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","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! /root/.npm/_logs/2024-01-02T08_19_53_217Z-debug.log

Ramone31 avatar Jan 02 '24 08:01 Ramone31

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

De-Hype avatar Jan 04 '24 06:01 De-Hype

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

Ramone31 avatar Jan 06 '24 05:01 Ramone31

Yeah mine fails too, bcrypt issue

Owez avatar Jan 16 '24 18:01 Owez

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

AnchalDevBytes avatar Mar 07 '24 11:03 AnchalDevBytes

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.

AnchalDevBytes avatar Mar 07 '24 11:03 AnchalDevBytes

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.

RussellHaley avatar Mar 24 '24 02:03 RussellHaley

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

RussellHaley avatar Mar 24 '24 18:03 RussellHaley