Node.bcrypt.js: 'npm install bcrypt' fails on Ubuntu 17.04 64 bit

Created on 9 Jun 2017  路  7Comments  路  Source: kelektiv/node.bcrypt.js

My environment:
Ubuntu 17.04, 64 bit
ETA: downgraded to node v6.11.0, getting the same error
npm v4.2.0

I have followed the instructions for Ubuntu:
https://github.com/kelektiv/node.bcrypt.js/wiki/Installation-Instructions#ubuntu-and-derivatives---elementary-linux-mint-etc

The installation seems to hang on the node-pre-gyp build.

Stack trace:

$ npm install bcrypt

[email protected] install /XXXXXX/node_modules/bcrypt
node-pre-gyp install --fallback-to-build

module.js:472
throw err;
^

Error: Cannot find module './internal/streams/stream'
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object. (/XXXXXXXX/node_modules/readable-stream/lib/_stream_readable.js:28:14)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
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":"x64"})
npm ERR! Linux 4.10.0-19-generic
npm ERR! argv "/XXXX/.nvm/versions/node/v7.10.0/bin/node" "/XXXX/.nvm/versions/node/v7.10.0/bin/npm" "install" "bcrypt"
npm ERR! node v7.10.0
npm ERR! npm v4.2.0
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

Interestingly, I can install node-pre-gyp with npm, but node-pre-gyp install --fallback-to-build still fails.

Any advice? Thank you!

Most helpful comment

Solved it.

You need this

sudo apt-get install build-essential g++

All 7 comments

But I am able to install it just fine !
Could you attach the full npm-error.log ?

Here you are!
npm-debug.txt

Looks like an issue with python or gcc headers.

Same here

Solved it.

You need this

sudo apt-get install build-essential g++

Yep, that solved it for me, too! Thanks!
PS. Multumesc, ca de la roman la roman ;-)

PS. Cu placere

Was this page helpful?
0 / 5 - 0 ratings