What went wrong,
Installing [email protected] on node v 8.12.0 causes an installation error where previous versions (8.11.4) did not.
See snippet below for the install log
node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v57 ABI, glibc) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error Remote end closed socket abruptly.
make: Entering directory '/home/gerwinb/triply/triply-server/node_modules/bcrypt/build'
CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt.o
node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v57 ABI, glibc) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error bad download
../src/bcrypt.cc: In function ‘void encode_salt(char*, u_int8_t*, char, u_int16_t, u_int8_t)’:
../src/bcrypt.cc:114:1: warning: ‘__builtin___snprintf_chk’ output may be truncated before the last format character [-Wformat-truncation=]
encode_salt(char *salt, u_int8_t *csalt, char minor, u_int16_t clen, u_int8_t logr)
^~~~~~~~~~~
In file included from /usr/include/stdio.h:862:0,
from ../src/bcrypt.cc:34:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:65:44: note: ‘__builtin___snprintf_chk’ output between 4 and 5 bytes into a destination of size 4
__bos (__s), __fmt, __va_arg_pack ());
^
../src/bcrypt.cc: In function ‘void bcrypt(const char*, const char*, char*)’:
../src/bcrypt.cc:147:1: warning: ‘__builtin___snprintf_chk’ output may be truncated before the last format character [-Wformat-truncation=]
bcrypt(const char *key, const char *salt, char *encrypted)
^~~~~~
In file included from /usr/include/stdio.h:862:0,
from ../src/bcrypt.cc:34:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:65:44: note: ‘__builtin___snprintf_chk’ output between 4 and 5 bytes into a destination of size 4
__bos (__s), __fmt, __va_arg_pack ());
^
../src/bcrypt.cc: At global scope:
../src/bcrypt.cc:316:1: fatal error: opening dependency file ./Release/.deps/Release/obj.target/bcrypt_lib/src/bcrypt.o.d.raw: No such file or directory
}
^
compilation terminated.
bcrypt_lib.target.mk:103: recipe for target 'Release/obj.target/bcrypt_lib/src/bcrypt.o' failed
make: *** [Release/obj.target/bcrypt_lib/src/bcrypt.o] Error 1
make: Leaving directory '/home/gerwinb/triply/triply-server/node_modules/bcrypt/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 4.15.0-34-generic
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/gerwinb/triply/triply-server/node_modules/bcrypt/lib/binding/bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=/home/gerwinb/triply/triply-server/node_modules/bcrypt/lib/binding" "--napi_version=3" "--node_abi_napi=napi"
gyp ERR! cwd /home/gerwinb/triply/triply-server/node_modules/bcrypt
gyp ERR! node -v v8.12.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/gerwinb/triply/triply-server/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/home/gerwinb/triply/triply-server/node_modules/bcrypt/lib/binding --napi_version=3 --node_abi_napi=napi' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/home/gerwinb/triply/triply-server/node_modules/bcrypt/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:126:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:214:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:915:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
node-pre-gyp ERR! System Linux 4.15.0-34-generic
node-pre-gyp ERR! command "/usr/local/bin/node" "/home/gerwinb/triply/triply-server/node_modules/bcrypt/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/gerwinb/triply/triply-server/node_modules/bcrypt
node-pre-gyp ERR! node -v v8.12.0
node-pre-gyp ERR! node-pre-gyp -v v0.10.2
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/gerwinb/triply/triply-server/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/home/gerwinb/triply/triply-server/node_modules/bcrypt/lib/binding --napi_version=3 --node_abi_napi=napi' (1)
Traceback (most recent call last):fo lifecycle [email protected]~install: Failed to exec install script
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 16, in <module>
sys.exit(gyp.script_main())
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 545, in script_main
return main(sys.argv[1:])
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 538, in main
return gyp_main(args)
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 502, in gyp_main
'cwd': os.getcwd(),
OSError: [Errno 2] No such file or directory
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:345:16)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 4.15.0-34-generic
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/home/gerwinb/triply/triply-server/node_modules/bcrypt/lib/binding/bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=/home/gerwinb/triply/triply-server/node_modules/bcrypt/lib/binding" "--napi_version=3" "--node_abi_napi=napi"
gyp ERR! cwd /home/gerwinb/triply/triply-server/node_modules/bcrypt
gyp ERR! node -v v8.12.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN [email protected] requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of gulp@>=4 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of typescript@>= 2.3.1 < 3 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of typescript@^2.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN @triply/[email protected] No license 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! /home/gerwinb/.npm/_logs/2018-09-14T12_06_58_533Z-debug.log
Which version and OS:
Node version 1.12.0
OS: Ubuntu 18.04
Also need resolution
This issue has normally been fix by this PR (https://github.com/kelektiv/node.bcrypt.js/pull/649) but the fix hasn't been released on the npm repo yet.
A release should be done soon with the fix but meanwhile you can link to the branch master of the github repo in your package.json like this :
"bcrypt": "https://github.com/kelektiv/node.bcrypt.js.git#master"
This is of course temporary solution.
does anybody know about any progress on that?
@AJRdev I cannot install the bcrypt corresponding to your solution.
@dantn93 What do you mean by you can't install it ?
Normally a release on npm should be done tonight so you won't have to use my solution :)
@AJRdev I also tried to add "bcrypt": "https://github.com/kelektiv/node.bcrypt.js.git#master" to my package json without luck. On my mac, which runs node 10.9.0, I have no problems. But, I'm creating a docker solution which uses node 8.12.0 and is still hitting this issue.
Dockerfile
```# specify the node base image with your desired version node:
FROM node:8
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm install
COPY . .
EXPOSE 3000
CMD [ "npm", "start" ]
```
@stridentbean Well I have a docker solution as well but I add a couple more dependecies to make bcrypt work in my image :
FROM node:8
RUN apt-get update && apt-get install -y build-essential && apt-get install -y python
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY package.json /usr/src/app/package.json
RUN npm install
COPY . /usr/src/app
EXPOSE 9000
CMD ["node", "."]
@stridentbean try remove --only=production.
I was pruning non-production packages during my docker build and bcrypt seems to install okay, but the app couldn't find it.
Disabling the pruning worked for me.
@mayask His flag --only=production is commented out so I don't think it's the problem.
Please try with v3.0.1
Having the same issue on MacOS 10.13.6 High Sierra
I reinstalled xcode and accepted the license and have tried globally installing node-gyp and node-pre-gyp
> yarn add bcrypt
error ~/node_modules/bcrypt: Command failed.
Exit code: 1
Command: node-pre-gyp install --fallback-to-build
Arguments:
Directory: ~/node_modules/bcrypt
Output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using [email protected]
node-pre-gyp info using [email protected] | darwin | x64
node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp info check checked for "~/node_modules/bcrypt/lib/binding/bcrypt_lib.node" (not found)
node-pre-gyp http GET https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.1/bcrypt_lib-v3.0.1-node-v57-darwin-x64-unknown.tar.gz
node-pre-gyp http 302 https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.1/bcrypt_lib-v3.0.1-node-v57-darwin-x64-unknown.tar.gz
node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v57 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error Remote end closed socket abruptly.
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info ok
node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v57 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error write EPROTO 140735783670656:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:827:
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info ok
gyp info it worked if it ends with ok
gypgyp info infospawn /usr/bin/python
using [email protected]
gyp info using [email protected] | darwin | x64
gyp info spawn args [ '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '~/node_modules/bcrypt/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '~/.node-gyp/8.12.0/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=~/.node-gyp/8.12.0',
gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=~/.node-gyp/8.12.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=~/node_modules/bcrypt',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info spawn /usr/bin/python
gyp info spawn args [ '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '~/node_modules/bcrypt/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '~/.node-gyp/8.12.0/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=~/.node-gyp/8.12.0',
gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=~/.node-gyp/8.12.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=~/node_modules/bcrypt',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info ok
gyp info ok
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
rm: ./Release/.deps/Release/obj.target/bcrypt_lib/src/blowfish.o.d.raw: No such file or directory
make: *** [Release/obj.target/bcrypt_lib/src/blowfish.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=~/node_modules/bcrypt/lib/binding/bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=~/node_modules/bcrypt/lib/binding" "--napi_version=3" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v57"
gyp ERR! cwd ~/node_modules/bcrypt
gyp ERR! node -v v8.12.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt.o
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=~/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=~/node_modules/bcrypt/lib/binding --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v57' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (~/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:126:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:214:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:915:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
node-pre-gyp ERR! System Darwin 17.7.0
node-pre-gyp ERR! command "/usr/local/bin/node" "~/node_modules/bcrypt/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd ~/node_modules/bcrypt
node-pre-gyp ERR! node -v v8.12.0
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=~/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=~/node_modules/bcrypt/lib/binding --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v57' (1)
CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt_node.o
SOLINK_MODULE(target) Release/bcrypt_lib.node
COPY ~/node_modules/bcrypt/lib/binding/bcrypt_lib.node
TOUCH Release/obj.target/action_after_build.stamp
gyp info ok
@agathver that's fixed my problem, feel free to close this issue.
I am still facing this issue on windows. Any update? I tried installing 3.0.1 version, still same error.
I am also facing the same issue still with "bcrypt": "3.0.1", node 8.12.0 and npm 6.4.1
I am also facing the same issue still with "bcrypt": "3.0.1", node 8.12.0 and npm 6.4.1 on Windows 10
Same, with yarn works fine
Same issue with [email protected] running on Ubuntu 18.04 LTS ([email protected]/[email protected]).
+1
Windows 10
node --version: v8.12.0
npm --version: 6.4.1
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v57 ABI, unknown) (falling back to source compile with node-gyp)
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
C:\dev\web\asm-server\node_modules\bcrypt\build\bcrypt_lib.vcxproj(20,3): error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the
gyp ERR! build error
Edit: I don't have c++ installed (so I guess that source compile doesn't work isn't surprising in my case - still wish there would be a pre-built binary.)
With Node v8.X.X use bcrypt >= 1.0.3 and < 3.0.0
(source: front page)
With Node v8.X.X use bcrypt >= 1.0.3 and < 3.0.0
(source: front page)
OHH !! ... hangs head in shame
My solution was to install build tools so that bcrypt local-build fallback be successful.
Any updates on this?
It seems that the main issue is node-pre-gyp which tries to use needle instead of request while downloading. needle is heavily broken.
However, I'm not able to reproduce the build failures. Source compile should always work if you have python2, make and a c++ compiler. The most likely reason is you are running npm as root (under sudo). Source compile will fail in such situations.
Manually adding request to dependencies causes node-pre-gyp to use it, which fixes issues associated with downloading pre-built binaries.
We're migrating to bcryptjs, zero dependencies, zero installation headaches.
We just upgraded to 8.11.4 and 'request' is in our dependencies. Deploying on AWS Elastic Beanstalk. It is failing to build bcrypt. It'll probably be faster for us to move to bcryptjs than to figure out how to get AWS to build this right.
@agathver running npm install --save request before attempting to install bcrypt fixed this issue for me! Thank you!
Currently using node v8.12 I also had this problem today, fixed with by specifying a specific bcrypt version
yarn add [email protected]
This works for me.
Device Configuration: Windows 10, npm version 6.4.1
still having challenges installing bcrypt....but want to try installing visual studio 2015 on my pc then i will know what to do afterwards...but if you have a an advice for me on this let me know
[email protected] install C:\Users\Nduka Victor\Downloads\SecondApp-master\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/v3.0.3/bcrypt_lib-v3.0.3-node-v57-win32-x64-unknown.tar.gz
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v57 ABI, unknown) (falling back to source compile with node-gyp)
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SDK, 2) ins
tall Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere. [C:\Users\Nduk
a Victor\Downloads\SecondApp-master\node_modules\bcrypt\build\binding.sln]
gyp ERR! build error
gyp ERR! stack Error: C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modulesnode-gyp\lib\build.js:262:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "build" "--fallback-to-build" "--module=C:\Users\Nduka Victor\Downloads\SecondApp-master\node_modules\bcrypt\lib\binding\bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=C:\Users\Nduka Victor\Downloads\SecondApp-master\node_modules\bcrypt\lib\binding" "--napi_version=3" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v57"
gyp ERR! cwd C:\Users\Nduka Victor\Downloads\SecondApp-master\node_modules\bcrypt
gyp ERR! node -v v8.12.0
gyp ERR! node-gyp -v v3.8.0
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\nodejs\node_modules\npm\node_modulesnode-gyp\binnode-gyp.js build --fallback-to-build --module=C:\Users\Nduka Victor\Downloads\SecondApp-master\node_modules\bcrypt\lib\binding\bcrypt_lib.node --module_name=bcrypt_lib --module_path=C:\Users\Nduka Victor\Downloads\SecondApp-master\node_modules\bcrypt\lib\binding --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v57' (1)
node-pre-gyp ERR! stack at ChildProcess.
node-pre-gyp ERR! stack at emitTwo (events.js:126:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:214:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:915:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
node-pre-gyp ERR! System Windows_NT 10.0.17134
node-pre-gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\Nduka Victor\Downloads\SecondApp-master\node_modules\bcrypt\node_modules\node-pre-gyp\bin\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\Nduka Victor\Downloads\SecondApp-master\node_modules\bcrypt
node-pre-gyp ERR! node -v v8.12.0
node-pre-gyp ERR! node-pre-gyp -v v0.12.0
node-pre-gyp ERR! not ok
Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modulesnode-gyp\binnode-gyp.js build --fallback-to-build --module=C:\Users\Nduka Victor\Downloads\SecondApp-master\node_modules\bcrypt\lib\binding\bcrypt_lib.node --module_name=bcrypt_lib --module_path=C:\Users\Nduka Victor\Downloads\SecondApp-master\node_modules\bcrypt\lib\binding --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v57' (1)
npm WARN [email protected] requires a peer of eslint@^3.19.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of eslint@^3.19.0 || ^4.5.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of eslint@^2.10.2 || ^3 || ^4 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] No description
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":"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\Nduka Victor\AppData\Roaming\npm-cache_logs\2019-01-20T10_21_54_399Z-debug.log
PS C:\Users\Nduka Victor\Downloads\SecondApp-master>
[email protected] install C:\Users\Nduka Victor\Downloads\SecondApp-master\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/v3.0.3/bcrypt_lib-v3.0.3-node-v57-win32-x64-unknown.tar.gz
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v57 ABI, unknown) (falling back to source compile with node-gyp)
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SDK, 2) ins
tall Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere. [C:\Users\Nduk
a Victor\Downloads\SecondApp-master\node_modules\bcrypt\build\binding.sln]
gyp ERR! build error
gyp ERR! stack Error:C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exefailed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modulesnode-gyp\lib\build.js:262:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modulesnode-gyp\binnode-gyp.js" "build" "--fallback-to-build" "--module=C:\Users\Nduka Victor\Downloads\SecondApp-master\node_modules\bcrypt\lib\binding\bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=C:\Users\Nduka Victor\Downloads\SecondApp-master\node_modules\bcrypt\lib\binding" "--napi_version=3" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v57"
gyp ERR! cwd C:\Users\Nduka Victor\Downloads\SecondApp-master\node_modules\bcrypt
gyp ERR! node -v v8.12.0
gyp ERR! node-gyp -v v3.8.0
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\nodejs\node_modules\npm\node_modulesnode-gyp\binnode-gyp.js build --fallback-to-build --module=C:\Users\Nduka Victor\Downloads\SecondApp-master\node_modules\bcrypt\lib\binding\bcrypt_lib.node --module_name=bcrypt_lib --module_path=C:\Users\Nduka Victor\Downloads\SecondApp-master\node_modules\bcrypt\lib\binding --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v57' (1)
node-pre-gyp ERR! stack at ChildProcess. (C:\Users\Nduka Victor\Downloads\SecondApp-master\node_modules\bcrypt\node_modulesnode-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:126:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:214:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:915:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
node-pre-gyp ERR! System Windows_NT 10.0.17134
node-pre-gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\Nduka Victor\Downloads\SecondApp-master\node_modules\bcrypt\node_modulesnode-pre-gyp\binnode-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\Nduka Victor\Downloads\SecondApp-master\node_modules\bcrypt
node-pre-gyp ERR! node -v v8.12.0
node-pre-gyp ERR! node-pre-gyp -v v0.12.0
node-pre-gyp ERR! not ok
Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modulesnode-gyp\binnode-gyp.js build --fallback-to-build --module=C:\Users\Nduka Victor\Downloads\SecondApp-master\node_modules\bcrypt\lib\binding\bcrypt_lib.node --module_name=bcrypt_lib --module_path=C:\Users\Nduka Victor\Downloads\SecondApp-master\node_modules\bcrypt\lib\binding --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v57' (1)
npm WARN [email protected] requires a peer of eslint@^3.19.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of eslint@^3.19.0 || ^4.5.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of eslint@^2.10.2 || ^3 || ^4 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] No description
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":"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\Nduka Victor\AppData\Roaming\npm-cache_logs\2019-01-20T10_21_54_399Z-debug.log
PS C:\Users\Nduka Victor\Downloads\SecondApp-master>
Have you at any point installed bcrypt successfully before. If yes, then Try running yarn add [email protected] or npm install --save [email protected] . This works for me on node version 8.12.0
[email protected] install /home/ibrahim/Desktop/Projects/turing-ecommerce/node_modules/bcrypt
node-pre-gyp install --fallback-to-build
node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v67 ABI, glibc) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error EACCES: permission denied, mkdir '/home/ibrahim/Desktop/Projects/turing-ecommerce/node_modules/bcrypt/lib'
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/home/ibrahim/Desktop/Projects/turing-ecommerce/node_modules/bcrypt/build'
gyp ERR! System Linux 4.15.0-47-generic
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/home/ibrahim/Desktop/Projects/turing-ecommerce/node_modules/bcrypt/lib/binding/bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=/home/ibrahim/Desktop/Projects/turing-ecommerce/node_modules/bcrypt/lib/binding" "--napi_version=4" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v67"
gyp ERR! cwd /home/ibrahim/Desktop/Projects/turing-ecommerce/node_modules/bcrypt
gyp ERR! node -v v11.14.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/home/ibrahim/Desktop/Projects/turing-ecommerce/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/home/ibrahim/Desktop/Projects/turing-ecommerce/node_modules/bcrypt/lib/binding --napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v67' (1)
node-pre-gyp ERR! stack at ChildProcess.
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:193:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:999:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:266:5)
node-pre-gyp ERR! System Linux 4.15.0-47-generic
node-pre-gyp ERR! command "/usr/local/bin/node" "/home/ibrahim/Desktop/Projects/turing-ecommerce/node_modules/bcrypt/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/ibrahim/Desktop/Projects/turing-ecommerce/node_modules/bcrypt
node-pre-gyp ERR! node -v v11.14.0
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/home/ibrahim/Desktop/Projects/turing-ecommerce/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/home/ibrahim/Desktop/Projects/turing-ecommerce/node_modules/bcrypt/lib/binding --napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v67' (1)
npm WARN @decorators/[email protected] requires a peer of @decorators/di@>=1.0.2 but none is installed. You must install peer dependencies yourself.
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! /home/ibrahim/.npm/_logs/2019-04-13T21_30_36_520Z-debug.log
i have been trying to install bcrypt but i keep getting this error. i have also tried the solutions here but non has worked so far. This is greatly slowing down my work
@ibravoh149
node-pre-gyp WARN Hit error EACCES: permission denied, mkdir '/home/ibrahim/Desktop/Projects/turing-ecommerce/node_modules/bcrypt/lib'
You have folder permission issues (perhaps you tried a sudo npm install sometimes?) run chown on node_modules
Also, update bcrypt to v3.0.4 to use pre-compiled modules for NodeJS 11 and up.
I checked node version with nvm and it was also showing stable (v10.11.0).
Finally, I tried.
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
and it worked for me.
Is this still an issue? Can this be marked as resolved?
If any one still have this problem you can fix it by doing this
npm install -g node-gyp
npm install --g --production windows-build-tools
or install cmake and gcc on linux by using
sudo apt install cmake gcc -y
Still having this issue:
I have installed build-essentials, gcc, make etc:
sudo apt-get install -y build-essential python
[2019-08-21T15:10:23-0400] [linuxme] app (AAA-111) $ node-gyp -v
v5.0.3
[2019-08-21T15:10:23-0400] [linuxme] app (AAA-111) $ python --version
Python 2.7.15+
[2019-08-21T15:10:23-0400] [linuxme] app (AAA-111) $ uname -r
4.4.0-18362-Microsoft
[2019-08-21T15:10:23-0400] [linuxme] app (AAA-111) $ npm -v
6.11.2
[2019-08-21T15:10:23-0400] [linuxme] app (AAA-111) $ node -v
v12.8.1
[2019-08-21T15:10:23-0400] [linuxme] app (AAA-111) $ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/7/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 7.4.0-1ubuntu1~18.04.1' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-7 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1)
Full Log:
(Also happens if I do npm install --build-from-source=bcrypt)
[2019-08-21T15:10:23-0400] [linuxme] app (AAA-111) $ npm install
> [email protected] install /c/Users/me/Documents/repos/pathTo/projectPath/app/node_modules/mcrypt
> node-gyp rebuild
make: Entering directory '/c/Users/me/Documents/repos/pathTo/projectPath/app/node_modules/mcrypt/build'
CC(target) Release/obj.target/libmcrypt/lib/libmcrypt/modules/algorithms/3-way.o
In file included from /usr/include/string.h:494:0,
from ../lib/libmcrypt/lib/libdefs.h:24,
from ../lib/libmcrypt/modules/algorithms/3-way.c:14:
In function ‘memcpy’,
inlined from ‘threeway_LTX__mcrypt_self_test’ at ../lib/libmcrypt/modules/algorithms/3-way.c:309:2:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:34:10: warning: ‘__builtin___memcpy_chk’: specified size between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]
return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC(target) Release/obj.target/libmcrypt/lib/libmcrypt/modules/algorithms/arcfour.o
CC(target) Release/obj.target/libmcrypt/lib/libmcrypt/modules/algorithms/blowfish.o
In file included from /usr/include/string.h:494:0,
from ../lib/libmcrypt/lib/libdefs.h:24,
from ../lib/libmcrypt/modules/algorithms/blowfish.c:12:
In function ‘memcpy’,
inlined from ‘blowfish_LTX__mcrypt_self_test’ at ../lib/libmcrypt/modules/algorithms/blowfish.c:533:2:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:34:10: warning: ‘__builtin___memcpy_chk’: specified size between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]
return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC(target) Release/obj.target/libmcrypt/lib/libmcrypt/modules/algorithms/blowfish-compat.o
In file included from /usr/include/string.h:494:0,
from ../lib/libmcrypt/lib/libdefs.h:24,
from ../lib/libmcrypt/modules/algorithms/blowfish-compat.c:12:
In function ‘memcpy’,
inlined from ‘blowfish_compat_LTX__mcrypt_self_test’ at ../lib/libmcrypt/modules/algorithms/blowfish-compat.c:625:2:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:34:10: warning: ‘__builtin___memcpy_chk’: specified size between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]
return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC(target) Release/obj.target/libmcrypt/lib/libmcrypt/modules/algorithms/cast-128.o
In file included from /usr/include/string.h:494:0,
from ../lib/libmcrypt/lib/libdefs.h:24,
from ../lib/libmcrypt/modules/algorithms/cast-128.c:18:
In function ‘memcpy’,
inlined from ‘cast_128_LTX__mcrypt_self_test’ at ../lib/libmcrypt/modules/algorithms/cast-128.c:361:2:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:34:10: warning: ‘__builtin___memcpy_chk’: specified size between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]
return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC(target) Release/obj.target/libmcrypt/lib/libmcrypt/modules/algorithms/cast-256.o
In file included from /usr/include/string.h:494:0,
from ../lib/libmcrypt/lib/libdefs.h:24,
from ../lib/libmcrypt/modules/algorithms/cast-256.c:67:
In function ‘memcpy’,
inlined from ‘cast_256_LTX__mcrypt_self_test’ at ../lib/libmcrypt/modules/algorithms/cast-256.c:538:2:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:34:10: warning: ‘__builtin___memcpy_chk’: specified size between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]
return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC(target) Release/obj.target/libmcrypt/lib/libmcrypt/modules/algorithms/des.o
In file included from /usr/include/string.h:494:0,
from ../lib/libmcrypt/lib/libdefs.h:24,
from ../lib/libmcrypt/modules/algorithms/des.c:19:
In function ‘memcpy’,
inlined from ‘des_LTX__mcrypt_self_test’ at ../lib/libmcrypt/modules/algorithms/des.c:631:2:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:34:10: warning: ‘__builtin___memcpy_chk’: specified size between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]
return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC(target) Release/obj.target/libmcrypt/lib/libmcrypt/modules/algorithms/enigma.o
CC(target) Release/obj.target/libmcrypt/lib/libmcrypt/modules/algorithms/gost.o
In file included from /usr/include/string.h:494:0,
from ../lib/libmcrypt/lib/libdefs.h:24,
from ../lib/libmcrypt/modules/algorithms/gost.c:40:
In function ‘memcpy’,
inlined from ‘gost_LTX__mcrypt_self_test’ at ../lib/libmcrypt/modules/algorithms/gost.c:381:2:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:34:10: warning: ‘__builtin___memcpy_chk’: specified size between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]
return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC(target) Release/obj.target/libmcrypt/lib/libmcrypt/modules/algorithms/loki97.o
In file included from /usr/include/string.h:494:0,
from ../lib/libmcrypt/lib/libdefs.h:24,
from ../lib/libmcrypt/modules/algorithms/loki97.c:66:
In function ‘memcpy’,
inlined from ‘loki97_LTX__mcrypt_self_test’ at ../lib/libmcrypt/modules/algorithms/loki97.c:442:2:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:34:10: warning: ‘__builtin___memcpy_chk’: specified size between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]
return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC(target) Release/obj.target/libmcrypt/lib/libmcrypt/modules/algorithms/panama.o
CC(target) Release/obj.target/libmcrypt/lib/libmcrypt/modules/algorithms/rc2.o
In file included from /usr/include/string.h:494:0,
from ../lib/libmcrypt/lib/libdefs.h:24,
from ../lib/libmcrypt/modules/algorithms/rc2.c:18:
In function ‘memcpy’,
inlined from ‘rc2_LTX__mcrypt_self_test’ at ../lib/libmcrypt/modules/algorithms/rc2.c:281:2:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:34:10: warning: ‘__builtin___memcpy_chk’: specified size between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]
return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC(target) Release/obj.target/libmcrypt/lib/libmcrypt/modules/algorithms/rijndael-128.o
In file included from /usr/include/string.h:494:0,
from ../lib/libmcrypt/lib/libdefs.h:24,
from ../lib/libmcrypt/modules/algorithms/rijndael-128.c:24:
In function ‘memcpy’,
inlined from ‘rijndael_128_LTX__mcrypt_self_test’ at ../lib/libmcrypt/modules/algorithms/rijndael-128.c:465:2:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:34:10: warning: ‘__builtin___memcpy_chk’: specified size between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]
return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC(target) Release/obj.target/libmcrypt/lib/libmcrypt/modules/algorithms/rijndael-192.o
In file included from /usr/include/string.h:494:0,
from ../lib/libmcrypt/lib/libdefs.h:24,
from ../lib/libmcrypt/modules/algorithms/rijndael-192.c:25:
In function ‘memcpy’,
inlined from ‘rijndael_192_LTX__mcrypt_self_test’ at ../lib/libmcrypt/modules/algorithms/rijndael-192.c:463:2:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:34:10: warning: ‘__builtin___memcpy_chk’: specified size between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]
return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC(target) Release/obj.target/libmcrypt/lib/libmcrypt/modules/algorithms/rijndael-256.o
In file included from /usr/include/string.h:494:0,
from ../lib/libmcrypt/lib/libdefs.h:24,
from ../lib/libmcrypt/modules/algorithms/rijndael-256.c:24:
In function ‘memcpy’,
inlined from ‘rijndael_256_LTX__mcrypt_self_test’ at ../lib/libmcrypt/modules/algorithms/rijndael-256.c:464:2:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:34:10: warning: ‘__builtin___memcpy_chk’: specified size between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]
return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC(target) Release/obj.target/libmcrypt/lib/libmcrypt/modules/algorithms/safer64.o
In file included from /usr/include/string.h:494:0,
from ../lib/libmcrypt/lib/libdefs.h:24,
from ../lib/libmcrypt/modules/algorithms/safer64.c:29:
In function ‘memcpy’,
inlined from ‘safer_sk64_LTX__mcrypt_self_test’ at ../lib/libmcrypt/modules/algorithms/safer64.c:353:2:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:34:10: warning: ‘__builtin___memcpy_chk’: specified size between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]
return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC(target) Release/obj.target/libmcrypt/lib/libmcrypt/modules/algorithms/safer128.o
In file included from /usr/include/string.h:494:0,
from ../lib/libmcrypt/lib/libdefs.h:24,
from ../lib/libmcrypt/modules/algorithms/safer128.c:30:
In function ‘memcpy’,
inlined from ‘safer_sk128_LTX__mcrypt_self_test’ at ../lib/libmcrypt/modules/algorithms/safer128.c:355:2:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:34:10: warning: ‘__builtin___memcpy_chk’: specified size between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]
return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC(target) Release/obj.target/libmcrypt/lib/libmcrypt/modules/algorithms/saferplus.o
In file included from /usr/include/string.h:494:0,
from ../lib/libmcrypt/lib/libdefs.h:24,
from ../lib/libmcrypt/modules/algorithms/saferplus.c:66:
In function ‘memcpy’,
inlined from ‘saferplus_LTX__mcrypt_self_test’ at ../lib/libmcrypt/modules/algorithms/saferplus.c:645:2:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:34:10: warning: ‘__builtin___memcpy_chk’: specified size between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]
return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC(target) Release/obj.target/libmcrypt/lib/libmcrypt/modules/algorithms/serpent.o
In file included from /usr/include/string.h:494:0,
from ../lib/libmcrypt/lib/libdefs.h:24,
from ../lib/libmcrypt/modules/algorithms/serpent.c:42:
In function ‘memcpy’,
inlined from ‘serpent_LTX__mcrypt_self_test’ at ../lib/libmcrypt/modules/algorithms/serpent.c:925:2:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:34:10: warning: ‘__builtin___memcpy_chk’: specified size between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]
return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC(target) Release/obj.target/libmcrypt/lib/libmcrypt/modules/algorithms/tripledes.o
CC(target) Release/obj.target/libmcrypt/lib/libmcrypt/modules/algorithms/twofish.o
../lib/libmcrypt/modules/algorithms/twofish.c: In function ‘h_fun’:
../lib/libmcrypt/modules/algorithms/twofish.c:229:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
b3 = q(1, b3) ^ byte(key[3], 3);
^
../lib/libmcrypt/modules/algorithms/twofish.c:230:2: note: here
case 3:
^~~~
../lib/libmcrypt/modules/algorithms/twofish.c:234:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
b3 = q(0, b3) ^ byte(key[2], 3);
^
../lib/libmcrypt/modules/algorithms/twofish.c:235:2: note: here
case 2:
^~~~
CC(target) Release/obj.target/libmcrypt/lib/libmcrypt/modules/algorithms/wake.o
CC(target) Release/obj.target/libmcrypt/lib/libmcrypt/modules/algorithms/xtea.o
In file included from /usr/include/string.h:494:0,
from ../lib/libmcrypt/lib/libdefs.h:24,
from ../lib/libmcrypt/modules/algorithms/xtea.c:13:
In function ‘memcpy’,
inlined from ‘xtea_LTX__mcrypt_self_test’ at ../lib/libmcrypt/modules/algorithms/xtea.c:198:2:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:34:10: warning: ‘__builtin___memcpy_chk’: specified size between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]
return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC(target) Release/obj.target/libmcrypt/lib/libmcrypt/modules/modes/cbc.o
CC(target) Release/obj.target/libmcrypt/lib/libmcrypt/modules/modes/cfb.o
CC(target) Release/obj.target/libmcrypt/lib/libmcrypt/modules/modes/ctr.o
CC(target) Release/obj.target/libmcrypt/lib/libmcrypt/modules/modes/ecb.o
CC(target) Release/obj.target/libmcrypt/lib/libmcrypt/modules/modes/ncfb.o
CC(target) Release/obj.target/libmcrypt/lib/libmcrypt/modules/modes/nofb.o
CC(target) Release/obj.target/libmcrypt/lib/libmcrypt/modules/modes/ofb.o
CC(target) Release/obj.target/libmcrypt/lib/libmcrypt/modules/modes/stream.o
CC(target) Release/obj.target/libmcrypt/lib/libmcrypt/lib/bzero.o
CC(target) Release/obj.target/libmcrypt/lib/libmcrypt/lib/mcrypt.o
CC(target) Release/obj.target/libmcrypt/lib/libmcrypt/lib/mcrypt_extra.o
CC(target) Release/obj.target/libmcrypt/lib/libmcrypt/lib/mcrypt_modules.o
CC(target) Release/obj.target/libmcrypt/lib/libmcrypt/lib/mcrypt_symb.o
CC(target) Release/obj.target/libmcrypt/lib/libmcrypt/lib/xmemory.o
AR(target) Release/obj.target/lib/libmcrypt/mcrypt.a
COPY Release/mcrypt.a
CXX(target) Release/obj.target/mcrypt/src/mcrypt.o
In file included from ../src/mcrypt.cc:3:0:
../src/mcrypt.h:21:26: error: ‘Handle’ has not been declared
static void Init(Handle<Object> exports);
^~~~~~
../src/mcrypt.h:21:32: error: expected ‘,’ or ‘...’ before ‘<’ token
static void Init(Handle<Object> exports);
^
../src/mcrypt.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE MCrypt::ValidateKeySize(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/mcrypt.cc:294:47: error: no matching function for call to ‘v8::Value::ToBoolean()’
Local<Boolean> state = info[0]->ToBoolean();
^
In file included from /home/linuxme/.cache/node-gyp/12.8.1/include/node/v8-internal.h:14:0,
from /home/linuxme/.cache/node-gyp/12.8.1/include/node/v8.h:25,
from /home/linuxme/.cache/node-gyp/12.8.1/include/node/node.h:63,
from ../../nan/nan.h:54,
from ../src/mcrypt.h:9,
from ../src/mcrypt.cc:3:
/home/linuxme/.cache/node-gyp/12.8.1/include/node/v8.h:2531:59: note: candidate: v8::MaybeLocal<v8::Boolean> v8::Value::ToBoolean(v8::Local<v8::Context>) const
V8_WARN_UNUSED_RESULT MaybeLocal<Boolean> ToBoolean(
^
/home/linuxme/.cache/node-gyp/12.8.1/include/node/v8config.h:311:3: note: in definition of macro ‘V8_DEPRECATED’
declarator __attribute__((deprecated(message)))
^~~~~~~~~~
/home/linuxme/.cache/node-gyp/12.8.1/include/node/v8.h:2531:59: note: candidate expects 1 argument, 0 provided
V8_WARN_UNUSED_RESULT MaybeLocal<Boolean> ToBoolean(
^
/home/linuxme/.cache/node-gyp/12.8.1/include/node/v8config.h:311:3: note: in definition of macro ‘V8_DEPRECATED’
declarator __attribute__((deprecated(message)))
^~~~~~~~~~
In file included from /home/linuxme/.cache/node-gyp/12.8.1/include/node/node.h:63:0,
from ../../nan/nan.h:54,
from ../src/mcrypt.h:9,
from ../src/mcrypt.cc:3:
/home/linuxme/.cache/node-gyp/12.8.1/include/node/v8.h:2547:18: note: candidate: v8::Local<v8::Boolean> v8::Value::ToBoolean(v8::Isolate*) const
Local<Boolean> ToBoolean(Isolate* isolate) const;
^~~~~~~~~
/home/linuxme/.cache/node-gyp/12.8.1/include/node/v8.h:2547:18: note: candidate expects 1 argument, 0 provided
../src/mcrypt.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE MCrypt::ValidateIvSize(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/mcrypt.cc:307:47: error: no matching function for call to ‘v8::Value::ToBoolean()’
Local<Boolean> state = info[0]->ToBoolean();
^
In file included from /home/linuxme/.cache/node-gyp/12.8.1/include/node/v8-internal.h:14:0,
from /home/linuxme/.cache/node-gyp/12.8.1/include/node/v8.h:25,
from /home/linuxme/.cache/node-gyp/12.8.1/include/node/node.h:63,
from ../../nan/nan.h:54,
from ../src/mcrypt.h:9,
from ../src/mcrypt.cc:3:
/home/linuxme/.cache/node-gyp/12.8.1/include/node/v8.h:2531:59: note: candidate: v8::MaybeLocal<v8::Boolean> v8::Value::ToBoolean(v8::Local<v8::Context>) const
V8_WARN_UNUSED_RESULT MaybeLocal<Boolean> ToBoolean(
^
/home/linuxme/.cache/node-gyp/12.8.1/include/node/v8config.h:311:3: note: in definition of macro ‘V8_DEPRECATED’
declarator __attribute__((deprecated(message)))
^~~~~~~~~~
/home/linuxme/.cache/node-gyp/12.8.1/include/node/v8.h:2531:59: note: candidate expects 1 argument, 0 provided
V8_WARN_UNUSED_RESULT MaybeLocal<Boolean> ToBoolean(
^
/home/linuxme/.cache/node-gyp/12.8.1/include/node/v8config.h:311:3: note: in definition of macro ‘V8_DEPRECATED’
declarator __attribute__((deprecated(message)))
^~~~~~~~~~
In file included from /home/linuxme/.cache/node-gyp/12.8.1/include/node/node.h:63:0,
from ../../nan/nan.h:54,
from ../src/mcrypt.h:9,
from ../src/mcrypt.cc:3:
/home/linuxme/.cache/node-gyp/12.8.1/include/node/v8.h:2547:18: note: candidate: v8::Local<v8::Boolean> v8::Value::ToBoolean(v8::Isolate*) const
Local<Boolean> ToBoolean(Isolate* isolate) const;
^~~~~~~~~
/home/linuxme/.cache/node-gyp/12.8.1/include/node/v8.h:2547:18: note: candidate expects 1 argument, 0 provided
../src/mcrypt.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE MCrypt::GetSupportedKeySizes(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/mcrypt.cc:398:52: warning: ‘bool v8::Object::Set(uint32_t, v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
array->Set(i, Nan::New<Number>(keySizes[i]));
^
In file included from /home/linuxme/.cache/node-gyp/12.8.1/include/node/v8-internal.h:14:0,
from /home/linuxme/.cache/node-gyp/12.8.1/include/node/v8.h:25,
from /home/linuxme/.cache/node-gyp/12.8.1/include/node/node.h:63,
from ../../nan/nan.h:54,
from ../src/mcrypt.h:9,
from ../src/mcrypt.cc:3:
/home/linuxme/.cache/node-gyp/12.8.1/include/node/v8.h:3375:26: note: declared here
bool Set(uint32_t index, Local<Value> value));
^
/home/linuxme/.cache/node-gyp/12.8.1/include/node/v8config.h:326:3: note: in definition of macro ‘V8_DEPRECATE_SOON’
declarator __attribute__((deprecated(message)))
^~~~~~~~~~
../src/mcrypt.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE MCrypt::GetAlgorithmNames(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/mcrypt.cc:476:66: warning: ‘bool v8::Object::Set(uint32_t, v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
array->Set(i, Nan::New<String>(algos[i]).ToLocalChecked());
^
In file included from /home/linuxme/.cache/node-gyp/12.8.1/include/node/v8-internal.h:14:0,
from /home/linuxme/.cache/node-gyp/12.8.1/include/node/v8.h:25,
from /home/linuxme/.cache/node-gyp/12.8.1/include/node/node.h:63,
from ../../nan/nan.h:54,
from ../src/mcrypt.h:9,
from ../src/mcrypt.cc:3:
/home/linuxme/.cache/node-gyp/12.8.1/include/node/v8.h:3375:26: note: declared here
bool Set(uint32_t index, Local<Value> value));
^
/home/linuxme/.cache/node-gyp/12.8.1/include/node/v8config.h:326:3: note: in definition of macro ‘V8_DEPRECATE_SOON’
declarator __attribute__((deprecated(message)))
^~~~~~~~~~
../src/mcrypt.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE MCrypt::GetModeNames(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/mcrypt.cc:495:66: warning: ‘bool v8::Object::Set(uint32_t, v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
array->Set(i, Nan::New<String>(modes[i]).ToLocalChecked());
^
In file included from /home/linuxme/.cache/node-gyp/12.8.1/include/node/v8-internal.h:14:0,
from /home/linuxme/.cache/node-gyp/12.8.1/include/node/v8.h:25,
from /home/linuxme/.cache/node-gyp/12.8.1/include/node/node.h:63,
from ../../nan/nan.h:54,
from ../src/mcrypt.h:9,
from ../src/mcrypt.cc:3:
/home/linuxme/.cache/node-gyp/12.8.1/include/node/v8.h:3375:26: note: declared here
bool Set(uint32_t index, Local<Value> value));
^
/home/linuxme/.cache/node-gyp/12.8.1/include/node/v8config.h:326:3: note: in definition of macro ‘V8_DEPRECATE_SOON’
declarator __attribute__((deprecated(message)))
^~~~~~~~~~
../src/mcrypt.cc: At global scope:
../src/mcrypt.cc:503:19: error: variable or field ‘Init’ declared void
void MCrypt::Init(Handle<Object> exports) {
^~~~~~
../src/mcrypt.cc:503:19: error: ‘Handle’ was not declared in this scope
../src/mcrypt.cc:503:19: note: suggested alternative: ‘rand_r’
void MCrypt::Init(Handle<Object> exports) {
^~~~~~
rand_r
../src/mcrypt.cc:503:32: error: expected primary-expression before ‘>’ token
void MCrypt::Init(Handle<Object> exports) {
^
../src/mcrypt.cc:503:34: error: ‘exports’ was not declared in this scope
void MCrypt::Init(Handle<Object> exports) {
^~~~~~~
mcrypt.target.mk:114: recipe for target 'Release/obj.target/mcrypt/src/mcrypt.o' failed
make: *** [Release/obj.target/mcrypt/src/mcrypt.o] Error 1
make: Leaving directory '/c/Users/me/Documents/repos/pathTo/projectPath/app/node_modules/mcrypt/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/linuxme/.nvm/versions/node/v12.8.1/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:196:23)
gyp ERR! stack at ChildProcess.emit (events.js:203:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Linux 4.4.0-18362-Microsoft
gyp ERR! command "/home/linuxme/.nvm/versions/node/v12.8.1/bin/node" "/home/linuxme/.nvm/versions/node/v12.8.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /c/Users/me/Documents/repos/pathTo/projectPath/app/node_modules/mcrypt
gyp ERR! node -v v12.8.1
gyp ERR! node-gyp -v v5.0.3
gyp ERR! not ok
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-gyp rebuild`
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! /home/linuxme/.npm/_logs/2019-08-26T20_24_58_935Z-debug.log
I also submitted this issue to: https://github.com/kelektiv/node.bcrypt.js/issues/751
Upgrading to bcrypt 3.0.6 solved the issue for me.
It seems that the main issue is
node-pre-gypwhich tries to useneedleinstead ofrequestwhile downloading.needleis heavily broken.However, I'm not able to reproduce the build failures. Source compile should always work if you have python2, make and a c++ compiler. The most likely reason is you are running npm as root (under sudo). Source compile will fail in such situations.
Manually adding
requestto dependencies causesnode-pre-gypto use it, which fixes issues associated with downloading pre-built binaries.
Works for me
In my case (Linux instance at AWS), after executing these commands it finally worked:
$ npm install -g node-gyp
$ sudo yum install gcc-c++
Before installing bcrypt install node-gyp in project dependency, This has solved problem on my machine.
npm install node-gyp
then
npm install bcrypt
Most helpful comment
Please try with v3.0.1