express3-mongodb-bootstrap-demo icon indicating copy to clipboard operation
express3-mongodb-bootstrap-demo copied to clipboard

Can't install bcrypt

Open hsch0 opened this issue 8 years ago • 3 comments

when installing bcrypt I receive the error messages below.

$ npm install bcrypt

> [email protected] install /home/hscho/codes/web/express3-mongodb-bootstrap-demo/node_modules/bcrypt
> node-gyp rebuild

make: Entering directory '/home/hscho/codes/web/express3-mongodb-bootstrap-demo/node_modules/bcrypt/build'
  CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
  CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt.o
  CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt_node.o
../src/bcrypt_node.cc: In destructor ‘virtual {anonymous}::baton_base::~baton_base()’:
../src/bcrypt_node.cc:54:18: error: ‘class v8::Persistent<v8::Function>’ has no member named ‘Dispose’
         callback.Dispose();
                  ^
../src/bcrypt_node.cc: At global scope:
../src/bcrypt_node.cc:128:19: error: variable or field ‘GenSaltAsync’ declared void
 void GenSaltAsync(uv_work_t* req) {
                   ^
../src/bcrypt_node.cc:128:19: error: ‘uv_work_t’ was not declared in this scope
../src/bcrypt_node.cc:128:30: error: ‘req’ was not declared in this scope
 void GenSaltAsync(uv_work_t* req) {
                              ^
../src/bcrypt_node.cc:137:24: error: variable or field ‘GenSaltAsyncAfter’ declared void
 void GenSaltAsyncAfter(uv_work_t* req) {
                        ^
../src/bcrypt_node.cc:137:24: error: ‘uv_work_t’ was not declared in this scope
../src/bcrypt_node.cc:137:35: error: ‘req’ was not declared in this scope
 void GenSaltAsyncAfter(uv_work_t* req) {
                                   ^
../src/bcrypt_node.cc:429:30: error: expected ‘}’ at end of input
 NODE_MODULE(bcrypt_lib, init);
                              ^
bcrypt_lib.target.mk:90: recipe for target 'Release/obj.target/bcrypt_lib/src/bcrypt_node.o' failed
make: *** [Release/obj.target/bcrypt_lib/src/bcrypt_node.o] Error 1
make: Leaving directory '/home/hscho/codes/web/express3-mongodb-bootstrap-demo/node_modules/bcrypt/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/hscho/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)
gyp ERR! stack     at emitTwo (events.js:88:13)
gyp ERR! stack     at ChildProcess.emit (events.js:173:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:201:12)
gyp ERR! System Linux 4.2.0-16-generic
gyp ERR! command "/home/hscho/local/bin/node" "/home/hscho/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/hscho/codes/web/express3-mongodb-bootstrap-demo/node_modules/bcrypt
gyp ERR! node -v v5.2.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok 
- [email protected] node_modules/bcrypt/node_modules/bindings
npm ERR! Linux 4.2.0-16-generic
npm ERR! argv "/home/hscho/local/bin/node" "/home/hscho/local/bin/npm" "install" "bcrypt"
npm ERR! node v5.2.0
npm ERR! npm  v3.3.12
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the bcrypt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls bcrypt
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/hscho/codes/web/express3-mongodb-bootstrap-demo/npm-debug.log

compiling globally with "npm install -g bcrypt" works...

$

hsch0 avatar Dec 11 '15 19:12 hsch0

Some virtualized instances have trouble with this. Add this to the package.json: "env": { "PYTHON": "/opt/local/bin/python2.7" } then try npm install or npm update. This is handy quick repo to get a little demo up and running. -Thanks!

chezmatt avatar Jan 05 '18 00:01 chezmatt

The bcrypt installation does not work.

xocolatl-aficionado avatar Sep 26 '18 00:09 xocolatl-aficionado

try :npm install --global --production windows-build-tools

VochanecA avatar Nov 12 '23 15:11 VochanecA