Bcrypt npm error, when deploying


#1

Hi,

I’m trying to run an application the first time on a digitalocean droplet. When trying to run the app I get the following error message:

/home/meteor/bundle/programs/server/node_modules/fibers/future.js:267
						throw(ex);
						^

Error: Could not locate the bindings file. Tried:
 → /home/meteor/bundle/programs/server/npm/node_modules/meteor/npm-bcrypt/node_modules/bcrypt/build/bcrypt_lib.node
 → /home/meteor/bundle/programs/server/npm/node_modules/meteor/npm-bcrypt/node_modules/bcrypt/build/Debug/bcrypt_lib.node
 → /home/meteor/bundle/programs/server/npm/node_modules/meteor/npm-bcrypt/node_modules/bcrypt/build/Release/bcrypt_lib.node
 → /home/meteor/bundle/programs/server/npm/node_modules/meteor/npm-bcrypt/node_modules/bcrypt/out/Debug/bcrypt_lib.node
 → /home/meteor/bundle/programs/server/npm/node_modules/meteor/npm-bcrypt/node_modules/bcrypt/Debug/bcrypt_lib.node
 → /home/meteor/bundle/programs/server/npm/node_modules/meteor/npm-bcrypt/node_modules/bcrypt/out/Release/bcrypt_lib.node
 → /home/meteor/bundle/programs/server/npm/node_modules/meteor/npm-bcrypt/node_modules/bcrypt/Release/bcrypt_lib.node
 → /home/meteor/bundle/programs/server/npm/node_modules/meteor/npm-bcrypt/node_modules/bcrypt/build/default/bcrypt_lib.node
 → /home/meteor/bundle/programs/server/npm/node_modules/meteor/npm-bcrypt/node_modules/bcrypt/compiled/5.11.1/linux/x64/bcrypt_lib.node
    at bindings (/home/meteor/bundle/programs/server/npm/node_modules/meteor/npm-bcrypt/node_modules/bcrypt/node_modules/bindings/bindings.js:88:9)
    at Object.<anonymous> (/home/meteor/bundle/programs/server/npm/node_modules/meteor/npm-bcrypt/node_modules/bcrypt/bcrypt.js:3:35)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Module.require (module.js:367:17)
    at require (internal/module.js:20:19)
    at Object.Npm.require (/home/meteor/bundle/programs/server/boot.js:182:18)
    at packages/npm-bcrypt/wrapper.js:1:1

When debugging a bit I found that node-gyp has difficulties compiling bcrypt

make: Entering directory `/home/meteor/bundle/programs/server/npm/node_modules/meteor/npm-bcrypt/node_modules/bcrypt/build'
  CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt_node.o
In file included from ../src/bcrypt_node.cc:1:0:
../node_modules/nan/nan.h:592:20: error: variable or field ‘AddGCEpilogueCallback’ declared void
       v8::Isolate::GCEpilogueCallback callback
                    ^
../node_modules/nan/nan.h:592:7: error: ‘GCEpilogueCallback’ is not a member of ‘v8::Isolate’
       v8::Isolate::GCEpilogueCallback callback
       ^
../node_modules/nan/nan.h:593:18: error: expected primary-expression before ‘gc_type_filter’
     , v8::GCType gc_type_filter = v8::kGCTypeAll) {
                  ^
../node_modules/nan/nan.h:598:20: error: variable or field ‘RemoveGCEpilogueCallback’ declared void
       v8::Isolate::GCEpilogueCallback callback) {
                    ^
../node_modules/nan/nan.h:598:7: error: ‘GCEpilogueCallback’ is not a member of ‘v8::Isolate’
       v8::Isolate::GCEpilogueCallback callback) {
       ^
../node_modules/nan/nan.h:603:20: error: variable or field ‘AddGCPrologueCallback’ declared void
       v8::Isolate::GCPrologueCallback callback
                    ^
../node_modules/nan/nan.h:603:7: error: ‘GCPrologueCallback’ is not a member of ‘v8::Isolate’
       v8::Isolate::GCPrologueCallback callback
       ^
../node_modules/nan/nan.h:604:18: error: expected primary-expression before ‘gc_type_filter’
     , v8::GCType gc_type_filter = v8::kGCTypeAll) {
                  ^
../node_modules/nan/nan.h:609:20: error: variable or field ‘RemoveGCPrologueCallback’ declared void
       v8::Isolate::GCPrologueCallback callback) {
                    ^
../node_modules/nan/nan.h:609:7: error: ‘GCPrologueCallback’ is not a member of ‘v8::Isolate’
       v8::Isolate::GCPrologueCallback callback) {
       ^
make: *** [Release/obj.target/bcrypt_lib/src/bcrypt_node.o] Error 1
make: Leaving directory `/home/meteor/bundle/programs/server/npm/node_modules/meteor/npm-bcrypt/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/lib/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:100:13)
gyp ERR! stack     at ChildProcess.emit (events.js:185:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System Linux 3.13.0-79-generic
gyp ERR! command "/usr/bin/nodejs" "/usr/bin/node-gyp" "build"
gyp ERR! cwd /home/meteor/bundle/programs/server/npm/node_modules/meteor/npm-bcrypt/node_modules/bcrypt
gyp ERR! node -v v5.11.1
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok

I’m running the latest ubuntu version.

NPM version: 3.8.6
Node version: v5.11.1 (also tried 6)

Anyone any idea ?


#2

Meteor does not support that version of nodejs.

In your project do a “meteor node -v” mine is v0.10.43