Node.bcrypt.js: Not Work on node v7

Created on 5 Dec 2016  ·  4Comments  ·  Source: kelektiv/node.bcrypt.js

After npm install I get:

gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/7.2.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/opt/IoT/Sentinel/sentinel/node_modules/bcrypt/.node-gyp"
make: Entering directory '/opt/IoT/Sentinel/sentinel/node_modules/bcrypt/build'
make: *** No rule to make target '../.node-gyp/7.2.0/include/node/common.gypi', needed by 'Makefile'.  Stop.
make: Leaving directory '/opt/IoT/Sentinel/sentinel/node_modules/bcrypt/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/opt/IoT/Sentinel/sentinel/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Linux 4.4.13-v7+
gyp ERR! command "/usr/local/bin/node" "/opt/IoT/Sentinel/sentinel/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/opt/IoT/Sentinel/sentinel/node_modules/bcrypt/lib/binding/bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=/opt/IoT/Sentinel/sentinel/node_modules/bcrypt/lib/binding"
gyp ERR! cwd /opt/IoT/Sentinel/sentinel/node_modules/bcrypt
gyp ERR! node -v v7.2.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /opt/IoT/Sentinel/sentinel/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/opt/IoT/Sentinel/sentinel/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/opt/IoT/Sentinel/sentinel/node_modules/bcrypt/lib/binding' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/opt/IoT/Sentinel/sentinel/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at emitTwo (events.js:106:13)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:885:16)

node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
node-pre-gyp ERR! System Linux 4.4.13-v7+
node-pre-gyp ERR! command "/usr/local/bin/node" "/opt/IoT/Sentinel/sentinel/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /opt/IoT/Sentinel/sentinel/node_modules/bcrypt
node-pre-gyp ERR! node -v v7.2.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.30
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /opt/IoT/Sentinel/sentinel/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/opt/IoT/Sentinel/sentinel/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/opt/IoT/Sentinel/sentinel/node_modules/bcrypt/lib/binding' (1)
[email protected] /opt/IoT/Sentinel/sentinel
└── (empty)

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
npm ERR! Linux 4.4.13-v7+
npm ERR! argv "/usr/local/bin/node" "/usr/bin/npm" "install"
npm ERR! node v7.2.0
npm ERR! npm  v3.10.8
npm ERR! code ELIFECYCLE

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 'node-pre-gyp install --fallback-to-build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.

Most helpful comment

Sorry, but why this is closed?
I'm having the same error here

All 4 comments

Sorry, but why this is closed?
I'm having the same error here

I'm also getting the same problem

This issue is caused my trying to install node_modules as "root" which is not allowed by default by npm

Can you provide more information or link to understand it? Thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

potts99 picture potts99  ·  5Comments

megmut picture megmut  ·  6Comments

Z3roCoder picture Z3roCoder  ·  5Comments

targos picture targos  ·  4Comments

jferrettiboke picture jferrettiboke  ·  4Comments