I have been using bcyrpt 0.8.5 with node 0.10.32 successfully for a while now. However, pushing to Heroku today and also trying to install the bcrypt library locally it fails to install.
I update to the latest version of bcrypt 1.0.1 and the node stable version 6.9.2 and still see the following error:
node-pre-gyp ERR! Tried to download: https://github.com/kelektiv/node.bcrypt.js/releases/download/v1.0.1/bcrypt_lib-v1.0.1-node-v48-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v48 ABI) (falling back to source compile with node-gyp)
The above path doesn't resolve.
Path to latest binary under /releases/ listed as
https://github.com/kelektiv/node.bcrypt.js/archive/v1.0.1.tar.gz
I just tried to install latest bcrypt module and I am getting a similar error:
node-pre-gyp http GET https://github.com/kelektiv/node.bcrypt.js/releases/download/v1.0.1/bcrypt_lib-v1.0.1-node-v51-win32-x64.tar.gz
node-pre-gyp http 404 https://github.com/kelektiv/node.bcrypt.js/releases/download/v1.0.1/bcrypt_lib-v1.0.1-node-v51-win32-x64.tar.gz
node-pre-gyp ERR! Tried to download: https://github.com/kelektiv/node.bcrypt.js/releases/download/v1.0.1/bcrypt_lib-v1.0.1-node-v51-win32-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v51 ABI) (falling back to source compile with node-gyp)
node-pre-gyp http Pre-built binary not available for your system, looked for https://github.com/kelektiv/node.bcrypt.js/releases/download/v1.0.1/bcrypt_lib-v1.0.1-node-v51-win32-x64.tar.gz
I cannot resolve the link in the log, so I am guessing it is a misconfiguration in the module?
same issue here, (with node4.6.2)
node-pre-gyp ERR! Tried to download: https://github.com/kelektiv/node.bcrypt.js/releases/download/v1.0.1/bcrypt_lib-v1.0.1-node-v46-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v46 ABI) (falling back to source compile with node-gyp)
seems to be the same problem when trying with 1.0.0, so I'm using the 0.8.7 which works for now for what I need.
Same problem on Win10Pro x64
node-pre-gyp ERR! Tried to download: https://github.com/kelektiv/node.bcrypt.js/releases/download/v1.0.1/bcrypt_lib-v1.0.1-node-v51-win32-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v51 ABI) (falling back to source compile with node-gyp)
The module uses node-pre-gyp which tries to get pre-built binaries for your platform. But unfortunately pre-built binaries for windows and macOS are not yet available.
The workaround is to install a build tool-chain on your system. See the extra requirements section of node-gyp
I've tried to follow the instructions, but still getting the error :
> [email protected] install /Users/***/Rocket.Chat/node_modules/bcrypt
> node-pre-gyp install --fallback-to-build
node-pre-gyp ERR! Tried to download: https://github.com/kelektiv/node.bcrypt.js/releases/download/v1.0.1/bcrypt_lib-v1.0.1-node-v46-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v46 ABI) (falling back to source compile with node-gyp)
gyp ERR! UNCAUGHT EXCEPTION
gyp ERR! stack Error: spawn EACCES
gyp ERR! stack at exports._errnoException (util.js:911:11)
gyp ERR! stack at ChildProcess.spawn (internal/child_process.js:309:11)
gyp ERR! stack at exports.spawn (child_process.js:362:9)
gyp ERR! stack at exports.execFile (child_process.js:151:15)
gyp ERR! stack at checkPythonVersion (/Users/***/.meteor/packages/meteor-tool/.1.4.2_3.1rd9djy++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/node-gyp/lib/configure.js:419:5)
gyp ERR! stack at /Users/***/.meteor/packages/meteor-tool/.1.4.2_3.1rd9djy++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/node-gyp/lib/configure.js:361:9
gyp ERR! stack at /Users/***/.meteor/packages/meteor-tool/.1.4.2_3.1rd9djy++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/node-gyp/node_modules/which/which.js:87:20
gyp ERR! stack at /Users/***/.meteor/packages/meteor-tool/.1.4.2_3.1rd9djy++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/node-gyp/node_modules/isexe/index.js:44:5
gyp ERR! stack at /Users/***/.meteor/packages/meteor-tool/.1.4.2_3.1rd9djy++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/node-gyp/node_modules/isexe/access.js:8:5
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:82:15)
gyp ERR! System Darwin 15.5.0
gyp ERR! command "/Users/***/.meteor/packages/meteor-tool/.1.4.2_3.1rd9djy++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/bin/node" "/Users/***/.meteor/packages/meteor-tool/.1.4.2_3.1rd9djy++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/Users/***/Rocket.Chat/node_modules/bcrypt/lib/binding/bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=/Users/***/Rocket.Chat/node_modules/bcrypt/lib/binding" "--python=/usr/local/Cellar/python/2.7.11/bin"
gyp ERR! cwd /Users/***/Rocket.Chat/node_modules/bcrypt
gyp ERR! node -v v4.6.2
gyp ERR! node-gyp -v v3.4.0
gyp ERR! This is a bug in `node-gyp`.
gyp ERR! Try to update node-gyp and file an Issue if it does not help:
gyp ERR! <https://github.com/nodejs/node-gyp/issues>
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/Users/***/.meteor/packages/meteor-tool/.1.4.2_3.1rd9djy++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/bin/node /Users/***/.meteor/packages/meteor-tool/.1.4.2_3.1rd9djy++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/***/Rocket.Chat/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/Users/***/Rocket.Chat/node_modules/bcrypt/lib/binding --python=/usr/local/Cellar/python/2.7.11/bin' (7)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/Users/***/Rocket.Chat/node_modules/bcrypt/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:87:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:172:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:854:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:222:5)
node-pre-gyp ERR! System Darwin 15.5.0
node-pre-gyp ERR! command "/Users/***/.meteor/packages/meteor-tool/.1.4.2_3.1rd9djy++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/bin/node" "/Users/***/Rocket.Chat/node_modules/bcrypt/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/***/Rocket.Chat/node_modules/bcrypt
node-pre-gyp ERR! node -v v4.6.2
node-pre-gyp ERR! node-pre-gyp -v v0.6.30
node-pre-gyp ERR! not ok
Failed to execute '/Users/***/.meteor/packages/meteor-tool/.1.4.2_3.1rd9djy++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/bin/node /Users/***/.meteor/packages/meteor-tool/.1.4.2_3.1rd9djy++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/***/Rocket.Chat/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/Users/***/Rocket.Chat/node_modules/bcrypt/lib/binding --python=/usr/local/Cellar/python/2.7.11/bin' (7)
npm ERR! Darwin 15.5.0
npm ERR! argv "/Users/***/.meteor/packages/meteor-tool/.1.4.2_3.1rd9djy++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/bin/node" "/Users/***/.meteor/packages/meteor-tool/.1.4.2_3.1rd9djy++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/bin/npm" "install" "--save" "bcrypt"
npm ERR! node v4.6.2
npm ERR! npm v3.10.9
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.
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-pre-gyp install --fallback-to-build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs bcrypt
npm ERR! Or if that isn't available, 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! /Users/***/Rocket.Chat/npm-debug.log
note: I tried different links to the python executable folder
usr/local/Cellar/python/2.7.11/bin
usr/local/Cellar/python/2.7.11/
is it the correct way to set it up ? any clue on what I'm doing wrong ?
Thanks
Ok problem solved, I tried all of this in another location on my computer and seems that there were permission issues. gyp ERR! stack Error: spawn EACCES
Now it builds properly.
I've also set the correct link to python: usr/bin/python2.7
I had a similar error listed in this Github issue.
I was able to fix a similar error, including the Pre-built binaries not found for [email protected] and [email protected] error by running:
npm i touch@latest
npm i bcrypt --save
node v6.9.2 and bcrypt v1.0.1
Same problem.
Ubuntu 16.04 LTS
Node 4.4.7
npm 2.15.8
bcrypt 1.0.2
node-pre-gyp ERR! Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v1.0.2/bcrypt_lib-v1.0.2-node-v46-linux-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v46 ABI) (falling
back to source compile with node-gyp)
have you tried npm install -g node-gyp ?
Also make sure you follow all the requirements here as mentionned by @Agathver in his comment above.
I'm having the sabe error.
[root@VM_159_24_centos panoSystem]# npm install bcrypt --save
> [email protected] install /opt/panoSystem/node_modules/bcrypt
> node-pre-gyp install --fallback-to-build
node-pre-gyp ERR! Tried to download: https://github.com/kelektiv/node.bcrypt.js/releases/download/v1.0.1/bcrypt_lib-v1.0.1-node-v47-linux-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v47 ABI) (falling back to source compile with node-gyp)
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
make: Entering directory `/opt/panoSystem/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
In file included from ../src/bcrypt_node.cc:1:
../../nan/nan.h:43:3: error: #error This version of node/NAN/v8 requires a C++11 compiler
In file included from /root/.node-gyp/5.10.1/include/node/node.h:42,
from ../../nan/nan.h:47,
from ../src/bcrypt_node.cc:1:
/root/.node-gyp/5.10.1/include/node/v8.h:336: error: expected unqualified-id before 'using'
/root/.node-gyp/5.10.1/include/node/v8.h: In constructor 'v8::MaybeLocal<T>::MaybeLocal()':
/root/.node-gyp/5.10.1/include/node/v8.h:353: error: 'nullptr' was not declared in this scope
/root/.node-gyp/5.10.1/include/node/v8.h: In member function 'bool v8::MaybeLocal<T>::IsEmpty() const':
/root/.node-gyp/5.10.1/include/node/v8.h:360: error: 'nullptr' was not declared in this scope
/root/.node-gyp/5.10.1/include/node/v8.h: In member function 'bool v8::MaybeLocal<T>::ToLocal(v8::Local<S>*) const':
/root/.node-gyp/5.10.1/include/node/v8.h:364: error: 'nullptr' was not declared in this scope
/root/.node-gyp/5.10.1/include/node/v8.h: In member function 'bool v8::WeakCallbackInfo<T>::IsFirstPass() const':
/root/.node-gyp/5.10.1/include/node/v8.h:430: error: 'nullptr' was not declared in this scope
/root/.node-gyp/5.10.1/include/node/v8.h: At global scope:
/root/.node-gyp/5.10.1/include/node/v8.h:469: error: expected unqualified-id before 'using'
/root/.node-gyp/5.10.1/include/node/v8.h: In constructor 'v8::Global<T>::Global()':
/root/.node-gyp/5.10.1/include/node/v8.h:794: error: 'nullptr' was not declared in this scope
/root/.node-gyp/5.10.1/include/node/v8.h: In constructor 'v8::Global<T>::Global(v8::Global<T>&&)':
/root/.node-gyp/5.10.1/include/node/v8.h:819: error: 'nullptr' was not declared in this scope
/root/.node-gyp/5.10.1/include/node/v8.h: In member function 'v8::Global<T>& v8::Global<T>::operator=(v8::Global<S>&&)':
/root/.node-gyp/5.10.1/include/node/v8.h:831: error: 'nullptr' was not declared in this scope
/root/.node-gyp/5.10.1/include/node/v8.h: At global scope:
/root/.node-gyp/5.10.1/include/node/v8.h:856: error: expected unqualified-id before 'using'
/root/.node-gyp/5.10.1/include/node/v8.h:1093: error: 'nullptr' was not declared in this scope
/root/.node-gyp/5.10.1/include/node/v8.h:1099: error: 'nullptr' was not declared in this scope
/root/.node-gyp/5.10.1/include/node/v8.h: In member function 'v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>) const':
/root/.node-gyp/5.10.1/include/node/v8.h:3204: error: 'nullptr' was not declared in this scope
/root/.node-gyp/5.10.1/include/node/v8.h: In member function 'v8::Local<T> v8::MaybeLocal<T>::ToLocalChecked()':
/root/.node-gyp/5.10.1/include/node/v8.h:7154: error: 'nullptr' was not declared in this scope
In file included from ../../nan/nan.h:190,
from ../src/bcrypt_node.cc:1:
../../nan/nan_maybe_43_inl.h: At global scope:
../../nan/nan_maybe_43_inl.h:13: error: expected unqualified-id before 'using'
../../nan/nan_maybe_43_inl.h:16: error: expected unqualified-id before 'using'
../../nan/nan_maybe_43_inl.h:19: error: expected initializer before '<' token
../../nan/nan_maybe_43_inl.h:24: error: expected initializer before '<' token
../../nan/nan_maybe_43_inl.h:31: error: expected initializer before '<' token
../../nan/nan_maybe_43_inl.h:36: error: expected initializer before '<' token
../../nan/nan_maybe_43_inl.h:41: error: expected initializer before '<' token
../../nan/nan_maybe_43_inl.h:46: error: expected initializer before '<' token
../../nan/nan_maybe_43_inl.h:51: error: expected initializer before '<' token
../../nan/nan_maybe_43_inl.h:59: error: expected initializer before '<' token
../../nan/nan_maybe_43_inl.h:64: error: expected initializer before '<' token
../../nan/nan_maybe_43_inl.h:69: error: expected initializer before '<' token
../../nan/nan_maybe_43_inl.h:76: error: expected initializer before '<' token
../../nan/nan_maybe_43_inl.h:83: error: expected initializer before '<' token
../../nan/nan_maybe_43_inl.h:91: error: expected initializer before '<' token
../../nan/nan_maybe_43_inl.h:98: error: expected initializer before '<' token
../../nan/nan_maybe_43_inl.h:108: error: expected initializer before '<' token
../../nan/nan_maybe_43_inl.h:114: error: expected initializer before '<' token
../../nan/nan_maybe_43_inl.h:118: error: expected initializer before '<' token
../../nan/nan_maybe_43_inl.h:125: error: expected initializer before '<' token
../../nan/nan_maybe_43_inl.h:130: error: expected initializer before '<' token
../../nan/nan_maybe_43_inl.h:135: error: expected initializer before '<' token
../../nan/nan_maybe_43_inl.h:139: error: expected initializer before '<' token
../../nan/nan_maybe_43_inl.h:145: error: expected initializer before '<' token
../../nan/nan_maybe_43_inl.h:150: error: expected initializer before '<' token
../../nan/nan_maybe_43_inl.h:156: error: expected initializer before '<' token
../../nan/nan_maybe_43_inl.h:162: error: expected initializer before '<' token
../../nan/nan_maybe_43_inl.h:168: error: expected initializer before '<' token
../../nan/nan_maybe_43_inl.h:174: error: expected initializer before '<' token
../../nan/nan_maybe_43_inl.h:180: error: expected initializer before '<' token
../../nan/nan_maybe_43_inl.h:186: error: expected initializer before '<' token
../../nan/nan_maybe_43_inl.h:194: error: expected initializer before '<' token
../../nan/nan_maybe_43_inl.h:201: error: expected initializer before '<' token
../../nan/nan_maybe_43_inl.h:205: error: expected initializer before '<' token
../../nan/nan_maybe_43_inl.h:209: error: expected initializer before '<' token
../../nan/nan_maybe_43_inl.h:213: error: expected initializer before '<' token
../../nan/nan_maybe_43_inl.h:217: error: expected initializer before '<' token
../../nan/nan_maybe_43_inl.h:237: error: expected initializer before '<' token
In file included from ../../nan/nan.h:195,
from ../src/bcrypt_node.cc:1:
../../nan/nan_converters.h:14: error: ISO C++ forbids declaration of 'MaybeLocal' with no type
../../nan/nan_converters.h:14: error: expected ';' before '<' token
../../nan/nan_converters.h:16: error: ISO C++ forbids declaration of 'Maybe' with no type
../../nan/nan_converters.h:16: error: expected ';' before '<' token
../../nan/nan_converters.h:26: error: 'return_t' does not name a type
../../nan/nan_converters.h:27: error: 'return_t' does not name a type
../../nan/nan_converters.h:28: error: 'return_t' does not name a type
../../nan/nan_converters.h:29: error: 'return_t' does not name a type
../../nan/nan_converters.h:30: error: 'return_t' does not name a type
../../nan/nan_converters.h:31: error: 'return_t' does not name a type
../../nan/nan_converters.h:32: error: 'return_t' does not name a type
../../nan/nan_converters.h:42: error: 'return_t' does not name a type
../../nan/nan_converters.h:43: error: 'return_t' does not name a type
../../nan/nan_converters.h:44: error: 'return_t' does not name a type
../../nan/nan_converters.h:45: error: 'return_t' does not name a type
../../nan/nan_converters.h:46: error: 'return_t' does not name a type
In file included from ../../nan/nan_converters.h:59,
from ../../nan/nan.h:195,
from ../src/bcrypt_node.cc:1:
../../nan/nan_converters_43_inl.h:18: error: 'return_t' in class 'Nan::imp::ToFactory<v8::Boolean>' does not name a type
../../nan/nan_converters_43_inl.h:19: error: 'return_t' in class 'Nan::imp::ToFactory<v8::Number>' does not name a type
../../nan/nan_converters_43_inl.h:20: error: 'return_t' in class 'Nan::imp::ToFactory<v8::String>' does not name a type
../../nan/nan_converters_43_inl.h:21: error: 'return_t' in class 'Nan::imp::ToFactory<v8::Object>' does not name a type
../../nan/nan_converters_43_inl.h:22: error: 'return_t' in class 'Nan::imp::ToFactory<v8::Integer>' does not name a type
../../nan/nan_converters_43_inl.h:23: error: 'return_t' in class 'Nan::imp::ToFactory<v8::Uint32>' does not name a type
../../nan/nan_converters_43_inl.h:24: error: 'return_t' in class 'Nan::imp::ToFactory<v8::Int32>' does not name a type
../../nan/nan_converters_43_inl.h:34: error: 'return_t' in class 'Nan::imp::ToFactory<bool>' does not name a type
../../nan/nan_converters_43_inl.h:35: error: 'return_t' in class 'Nan::imp::ToFactory<double>' does not name a type
../../nan/nan_converters_43_inl.h:36: error: 'return_t' in class 'Nan::imp::ToFactory<long int>' does not name a type
../../nan/nan_converters_43_inl.h:37: error: 'return_t' in class 'Nan::imp::ToFactory<unsigned int>' does not name a type
../../nan/nan_converters_43_inl.h:38: error: 'return_t' in class 'Nan::imp::ToFactory<int>' does not name a type
In file included from ../../nan/nan.h:196,
from ../src/bcrypt_node.cc:1:
../../nan/nan_new.h: In function 'v8::Local<T> Nan::imp::To(v8::Local<v8::Integer>) [with T = v8::Integer]':
../../nan/nan_new.h:21: error: no matching function for call to 'To(v8::Local<v8::Integer>&)'
../../nan/nan_new.h: In function 'v8::Local<T> Nan::imp::To(v8::Local<v8::Integer>) [with T = v8::Int32]':
../../nan/nan_new.h:28: error: no matching function for call to 'To(v8::Local<v8::Integer>&)'
../../nan/nan_new.h: In function 'v8::Local<T> Nan::imp::To(v8::Local<v8::Integer>) [with T = v8::Uint32]':
../../nan/nan_new.h:35: error: no matching function for call to 'To(v8::Local<v8::Integer>&)'
../../nan/nan_new.h: At global scope:
../../nan/nan_new.h:43: error: ISO C++ forbids declaration of 'MaybeLocal' with no type
../../nan/nan_new.h:43: error: expected ';' before '<' token
../../nan/nan_new.h:75: error: 'return_t' does not name a type
../../nan/nan_new.h:141: error: 'return_t' does not name a type
../../nan/nan_new.h:147: error: 'return_t' does not name a type
../../nan/nan_new.h:148: error: 'return_t' does not name a type
../../nan/nan_new.h:160: error: 'return_t' does not name a type
../../nan/nan_new.h:161: error: 'return_t' does not name a type
../../nan/nan_new.h:162: error: 'return_t' does not name a type
../../nan/nan_new.h:163: error: 'return_t' does not name a type
../../nan/nan_new.h:165: error: 'return_t' does not name a type
../../nan/nan_new.h:166: error: 'return_t' does not name a type
../../nan/nan_new.h:182: error: 'return_t' does not name a type
../../nan/nan_new.h:183: error: 'return_t' does not name a type
In file included from ../../nan/nan_new.h:189,
from ../../nan/nan.h:196,
from ../src/bcrypt_node.cc:1:
../../nan/nan_implementation_12_inl.h:61: error: 'return_t' in class 'Nan::imp::Factory<v8::Date>' does not name a type
../../nan/nan_implementation_12_inl.h: In static member function 'static v8::Local<v8::Function> Nan::imp::Factory<v8::Function>::New(void (*)(const Nan::FunctionCallbackInfo<v8::Value>&), v8::Local<v8::Value>)':
../../nan/nan_implementation_12_inl.h:95: error: 'NewInstance' was not declared in this scope
../../nan/nan_implementation_12_inl.h: In static member function 'static v8::Local<v8::FunctionTemplate> Nan::imp::Factory<v8::FunctionTemplate>::New(void (*)(const Nan::FunctionCallbackInfo<v8::Value>&), v8::Local<v8::Value>, v8::Local<v8::Signature>)':
../../nan/nan_implementation_12_inl.h:123: error: 'NewInstance' was not declared in this scope
../../nan/nan_implementation_12_inl.h: At global scope:
../../nan/nan_implementation_12_inl.h:202: error: 'return_t' in class 'Nan::imp::Factory<v8::RegExp>' does not name a type
../../nan/nan_implementation_12_inl.h:221: error: 'return_t' in class 'Nan::imp::Factory<v8::Script>' does not name a type
../../nan/nan_implementation_12_inl.h:227: error: 'return_t' in class 'Nan::imp::Factory<v8::Script>' does not name a type
../../nan/nan_implementation_12_inl.h:259: error: 'return_t' in class 'Nan::imp::Factory<v8::String>' does not name a type
../../nan/nan_implementation_12_inl.h:267: error: 'return_t' in class 'Nan::imp::Factory<v8::String>' does not name a type
../../nan/nan_implementation_12_inl.h:273: error: 'return_t' in class 'Nan::imp::Factory<v8::String>' does not name a type
../../nan/nan_implementation_12_inl.h:280: error: 'return_t' in class 'Nan::imp::Factory<v8::String>' does not name a type
../../nan/nan_implementation_12_inl.h:286: error: 'return_t' in class 'Nan::imp::Factory<v8::String>' does not name a type
../../nan/nan_implementation_12_inl.h:291: error: 'return_t' in class 'Nan::imp::Factory<v8::String>' does not name a type
../../nan/nan_implementation_12_inl.h:352: error: 'return_t' in class 'Nan::imp::Factory<v8::UnboundScript>' does not name a type
../../nan/nan_implementation_12_inl.h:359: error: 'return_t' in class 'Nan::imp::Factory<v8::UnboundScript>' does not name a type
In file included from ../../nan/nan.h:196,
from ../src/bcrypt_node.cc:1:
../../nan/nan_new.h:293: error: 'return_t' in class 'Nan::imp::Factory<v8::String>' does not name a type
../../nan/nan_new.h:299: error: 'return_t' in class 'Nan::imp::Factory<v8::String>' does not name a type
../../nan/nan_new.h:305: error: 'return_t' in class 'Nan::imp::Factory<v8::String>' does not name a type
../../nan/nan_new.h:311: error: 'return_t' in class 'Nan::imp::Factory<v8::String>' does not name a type
../../nan/nan_new.h:317: error: 'return_t' in class 'Nan::imp::Factory<v8::String>' does not name a type
../../nan/nan_new.h:323: error: 'return_t' in class 'Nan::imp::Factory<v8::String>' does not name a type
../../nan/nan_new.h:329: error: 'return_t' in class 'Nan::imp::Factory<v8::String>' does not name a type
../../nan/nan_new.h:335: error: 'return_t' in class 'Nan::imp::Factory<v8::RegExp>' does not name a type
In file included from ../src/bcrypt_node.cc:1:
../../nan/nan.h: In function 'v8::Local<v8::Value> Nan::Error(const char*)':
../../nan/nan.h:655: error: 'class v8::Local<v8::Boolean>' has no member named 'ToLocalChecked'
../../nan/nan.h: In function 'void Nan::ThrowError(const char*)':
../../nan/nan.h:655: error: 'class v8::Local<v8::Boolean>' has no member named 'ToLocalChecked'
../../nan/nan.h: In function 'v8::Local<v8::Value> Nan::RangeError(const char*)':
../../nan/nan.h:656: error: 'class v8::Local<v8::Boolean>' has no member named 'ToLocalChecked'
../../nan/nan.h: In function 'void Nan::ThrowRangeError(const char*)':
../../nan/nan.h:656: error: 'class v8::Local<v8::Boolean>' has no member named 'ToLocalChecked'
../../nan/nan.h: In function 'v8::Local<v8::Value> Nan::ReferenceError(const char*)':
../../nan/nan.h:657: error: 'class v8::Local<v8::Boolean>' has no member named 'ToLocalChecked'
../../nan/nan.h: In function 'void Nan::ThrowReferenceError(const char*)':
../../nan/nan.h:657: error: 'class v8::Local<v8::Boolean>' has no member named 'ToLocalChecked'
../../nan/nan.h: In function 'v8::Local<v8::Value> Nan::SyntaxError(const char*)':
../../nan/nan.h:658: error: 'class v8::Local<v8::Boolean>' has no member named 'ToLocalChecked'
../../nan/nan.h: In function 'void Nan::ThrowSyntaxError(const char*)':
../../nan/nan.h:658: error: 'class v8::Local<v8::Boolean>' has no member named 'ToLocalChecked'
../../nan/nan.h: In function 'v8::Local<v8::Value> Nan::TypeError(const char*)':
../../nan/nan.h:659: error: 'class v8::Local<v8::Boolean>' has no member named 'ToLocalChecked'
../../nan/nan.h: In function 'void Nan::ThrowTypeError(const char*)':
../../nan/nan.h:659: error: 'class v8::Local<v8::Boolean>' has no member named 'ToLocalChecked'
../../nan/nan.h: At global scope:
../../nan/nan.h:667: error: expected initializer before '<' token
../../nan/nan.h:689: error: expected initializer before '<' token
../../nan/nan.h:705: error: expected initializer before '<' token
../../nan/nan.h:718: error: expected initializer before '<' token
../../nan/nan.h:735: error: expected initializer before '<' token
../../nan/nan.h:741: error: expected initializer before '<' token
../../nan/nan.h:749: error: expected initializer before '<' token
../../nan/nan.h:756: error: expected initializer before '<' token
../../nan/nan.h:762: error: expected initializer before '<' token
/root/.node-gyp/5.10.1/include/node/v8.h: In member function 'void Nan::Callback::SetFunction(const v8::Local<v8::Function>&)':
/root/.node-gyp/5.10.1/include/node/v8.h:3019: error: argument dependent lookup finds 'class v8::Set'
../../nan/nan.h:1398: error: in call to 'Set'
../../nan/nan.h: In member function 'void Nan::AsyncWorker::SaveToPersistent(const char*, const v8::Local<v8::Value>&)':
../../nan/nan.h:1518: error: 'class v8::Local<v8::Boolean>' has no member named 'ToLocalChecked'
../../nan/nan.h: In member function 'v8::Local<v8::Value> Nan::AsyncWorker::GetFromPersistent(const char*) const':
../../nan/nan.h:1536: error: 'class v8::Local<v8::Boolean>' has no member named 'ToLocalChecked'
../../nan/nan.h: In member function 'virtual void Nan::AsyncWorker::HandleErrorCallback()':
../../nan/nan.h:1570: error: no matching function for call to 'New(const char*)'
../../nan/nan.h: In function 'void Nan::imp::SetMethodAux(T, v8::Local<v8::String>, v8::Local<v8::FunctionTemplate>, ...)':
../../nan/nan.h:1872: error: there are no arguments to 'GetFunction' that depend on a template parameter, so a declaration of 'GetFunction' must be available
../../nan/nan.h:1872: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
../../nan/nan.h: In function 'void Nan::SetMethod(HandleType<T>, const char*, void (*)(const Nan::FunctionCallbackInfo<v8::Value>&))':
../../nan/nan.h:1884: error: 'class v8::Local<v8::Boolean>' has no member named 'ToLocalChecked'
../../nan/nan.h: In function 'void Nan::SetPrototypeMethod(v8::Local<v8::FunctionTemplate>, const char*, void (*)(const Nan::FunctionCallbackInfo<v8::Value>&))':
../../nan/nan.h:1899: error: 'class v8::Local<v8::Boolean>' has no member named 'ToLocalChecked'
../../nan/nan.h: In function 'void Nan::SetAccessor(v8::Local<v8::ObjectTemplate>, v8::Local<v8::String>, void (*)(v8::Local<v8::String>, const Nan::PropertyCallbackInfo<v8::Value>&), void (*)(v8::Local<v8::String>, v8::Local<v8::Value>, const Nan::PropertyCallbackInfo<void>&), v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute, Nan::imp::Sig)':
../../nan/nan.h:1924: error: 'NewInstance' was not declared in this scope
../../nan/nan.h: In function 'bool Nan::SetAccessor(v8::Local<v8::Object>, v8::Local<v8::String>, void (*)(v8::Local<v8::String>, const Nan::PropertyCallbackInfo<v8::Value>&), void (*)(v8::Local<v8::String>, v8::Local<v8::Value>, const Nan::PropertyCallbackInfo<void>&), v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute)':
../../nan/nan.h:1967: error: 'NewInstance' was not declared in this scope
../../nan/nan.h: In function 'void Nan::SetNamedPropertyHandler(v8::Local<v8::ObjectTemplate>, void (*)(v8::Local<v8::String>, const Nan::PropertyCallbackInfo<v8::Value>&), void (*)(v8::Local<v8::String>, v8::Local<v8::Value>, const Nan::PropertyCallbackInfo<v8::Value>&), void (*)(v8::Local<v8::String>, const Nan::PropertyCallbackInfo<v8::Integer>&), void (*)(v8::Local<v8::String>, const Nan::PropertyCallbackInfo<v8::Boolean>&), void (*)(const Nan::PropertyCallbackInfo<v8::Array>&), v8::Local<v8::Value>)':
../../nan/nan.h:2026: error: 'NewInstance' was not declared in this scope
../../nan/nan.h: In function 'void Nan::SetIndexedPropertyHandler(v8::Local<v8::ObjectTemplate>, void (*)(uint32_t, const Nan::PropertyCallbackInfo<v8::Value>&), void (*)(uint32_t, v8::Local<v8::Value>, const Nan::PropertyCallbackInfo<v8::Value>&), void (*)(uint32_t, const Nan::PropertyCallbackInfo<v8::Integer>&), void (*)(uint32_t, const Nan::PropertyCallbackInfo<v8::Boolean>&), void (*)(const Nan::PropertyCallbackInfo<v8::Array>&), v8::Local<v8::Value>)':
../../nan/nan.h:2096: error: 'NewInstance' was not declared in this scope
../../nan/nan.h: In function 'void Nan::SetCallHandler(v8::Local<v8::FunctionTemplate>, void (*)(const Nan::FunctionCallbackInfo<v8::Value>&), v8::Local<v8::Value>)':
../../nan/nan.h:2151: error: 'NewInstance' was not declared in this scope
../../nan/nan.h: In function 'void Nan::SetCallAsFunctionHandler(v8::Local<v8::ObjectTemplate>, void (*)(const Nan::FunctionCallbackInfo<v8::Value>&), v8::Local<v8::Value>)':
../../nan/nan.h:2173: error: 'NewInstance' was not declared in this scope
In file included from ../src/bcrypt_node.cc:1:
../../nan/nan.h: In function 'void Nan::Export(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE, const char*, void (*)(const Nan::FunctionCallbackInfo<v8::Value>&))':
../../nan/nan.h:2200: error: no matching function for call to 'New(const char*&)'
../../nan/nan.h:2201: error: 'GetFunction' was not declared in this scope
/root/.node-gyp/5.10.1/include/node/v8.h:3019: error: argument dependent lookup finds 'class v8::Set'
../../nan/nan.h:2201: error: in call to 'Set'
../../nan/nan.h: In constructor 'Nan::Tap::Tap(v8::Local<v8::Value>)':
../../nan/nan.h:2208: error: no matching function for call to 'To(v8::Local<v8::Value>&)'
../../nan/nan.h: In member function 'void Nan::Tap::ok(bool, const char*)':
../../nan/nan.h:2221: error: 'class v8::Local<v8::Boolean>' has no member named 'ToLocalChecked'
../../nan/nan.h: In member function 'void Nan::Tap::pass(const char*)':
../../nan/nan.h:2227: error: 'class v8::Local<v8::Boolean>' has no member named 'ToLocalChecked'
../../nan/nan.h: At global scope:
../../nan/nan.h:2251: error: ISO C++ forbids declaration of 'MaybeLocal' with no type
../../nan/nan.h:2251: error: expected ';' before '<' token
../../nan/nan.h:2254: error: expected ';' before '}' token
../../nan/nan.h:2256: error: 'MaybeLocal' was not declared in this scope
../../nan/nan.h:2256: error: template argument 1 is invalid
../../nan/nan.h:2256: error: expected unqualified-id before '>' token
../../nan/nan.h:2265: error: expected constructor, destructor, or type conversion before '<' token
../src/bcrypt_node.cc: In function 'Nan::NAN_METHOD_RETURN_TYPE<unnamed>::GenerateSalt(const Nan::FunctionCallbackInfo<v8::Value>&)':
../src/bcrypt_node.cc:108: error: no matching function for call to 'To(v8::Local<v8::Value>)'
../src/bcrypt_node.cc: In function 'Nan::NAN_METHOD_RETURN_TYPE<unnamed>::GenerateSaltSync(const Nan::FunctionCallbackInfo<v8::Value>&)':
../src/bcrypt_node.cc:131: error: no matching function for call to 'To(v8::Local<v8::Value>)'
make: *** [Release/obj.target/bcrypt_lib/src/bcrypt_node.o] Error 1
make: Leaving directory `/opt/panoSystem/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: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 2.6.32-642.6.2.el6.x86_64
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=/opt/panoSystem/node_modules/bcrypt/lib/binding/bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=/opt/panoSystem/node_modules/bcrypt/lib/binding"
gyp ERR! cwd /opt/panoSystem/node_modules/bcrypt
gyp ERR! node -v v5.10.1
gyp ERR! node-gyp -v v3.3.1
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=/opt/panoSystem/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/opt/panoSystem/node_modules/bcrypt/lib/binding' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/opt/panoSystem/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:100:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:185:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:850:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
node-pre-gyp ERR! System Linux 2.6.32-642.6.2.el6.x86_64
node-pre-gyp ERR! command "/usr/local/bin/node" "/opt/panoSystem/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /opt/panoSystem/node_modules/bcrypt
node-pre-gyp ERR! node -v v5.10.1
node-pre-gyp ERR! node-pre-gyp -v v0.6.30
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=/opt/panoSystem/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/opt/panoSystem/node_modules/bcrypt/lib/binding' (1)
npm ERR! Linux 2.6.32-642.6.2.el6.x86_64
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "bcrypt" "--save"
npm ERR! node v5.10.1
npm ERR! npm v3.8.3
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.
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-pre-gyp install --fallback-to-build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs bcrypt
npm ERR! Or if that isn't available, 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! /opt/panoSystem/npm-debug.log
node 5.10.1
npm 3.8.3
Bump
This is not an issue with the library. This is due to in availability of a build toolchain in your systems. The requirement for a appropriate build toolchains for various systems is listed here
This library uses node-pre-gyp which downloads precompiled libraries if available, for the last releaes there are no binaries yet therefore you must have a toolchain installed. Any node-pre-gyp related errors can be safely ignored.
yeaaaaaaaaah. Did the instructions you pointed out for Windows. It ran successfully. Then
run npm install bcrypt and I get:
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'.
node ver: 6.7.0
npm ver: 3.10.3
Run npm install --global --production windows-build-tools with administrator rights helps me on Win10 Pro x64.
Thanks @p0vidl0
But My Computer is fail by Linux
@wangwenjie1314
Try to install python 2.7, make and gcc
On ubuntu you can try apt install build-essential
On alpine linux works with: apk add alpine-sdk python
Node gyp is root of "problems"
Hi,
Try to install some dependencies
npm install node-gyp -g
apt-get install python
apt-get install make
apt-get install g++
```
It also works properly,
But,
There are some issues
Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v1.0.2/bcrypt_lib-v1.0.2-node-v48-linux-x64.tar.gz
```
https://github.com/kelektiv/node.bcrypt.js/issues/476
Why?
Thanks!
@jebeser See #476
I just added a pull request, it fixed my issue: https://github.com/kelektiv/node.bcrypt.js/pull/489
I am using ubuntu 16.04 LTS with Node V6.4
Got Same Issue While Installing Bcrypt ..
> [email protected] install /home/shivaraj/bitbucket/freshersuniverse-middleware/node_modules/bcrypt
> node-pre-gyp install --fallback-to-build
node-pre-gyp ERR! Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v1.0.2/bcrypt_lib-v1.0.2-node-v48-linux-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v48 ABI) (falling back to source compile with node-gyp)
make: Entering directory '/home/shivaraj/bitbucket/freshersuniverse-middleware/node_modules/bcrypt/build'
CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
./Release/.deps/Release/obj.target/bcrypt_lib/src/blowfish.o.d.raw { dev: 2055,
mode: 33204,
nlink: 1,
uid: 1000,
gid: 1000,
rdev: 0,
blksize: 4096,
ino: 1837678,
size: 86,
blocks: 8,
atime: 2017-02-27T10:00:58.000Z,
mtime: 2017-02-27T10:00:58.000Z,
ctime: 2017-02-27T10:00:58.048Z,
birthtime: 2017-02-27T10:00:58.048Z }
CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt.o
./Release/.deps/Release/obj.target/bcrypt_lib/src/bcrypt.o.d.raw { dev: 2055,
mode: 33204,
nlink: 1,
uid: 1000,
gid: 1000,
rdev: 0,
blksize: 4096,
ino: 1837678,
size: 82,
blocks: 8,
atime: 2017-02-27T10:00:59.000Z,
mtime: 2017-02-27T10:00:59.000Z,
ctime: 2017-02-27T10:00:59.760Z,
birthtime: 2017-02-27T10:00:59.760Z }
CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt_node.o
./Release/.deps/Release/obj.target/bcrypt_lib/src/bcrypt_node.o.d.raw { dev: 2055,
mode: 33204,
nlink: 1,
uid: 1000,
gid: 1000,
rdev: 0,
blksize: 4096,
ino: 1837678,
size: 1368,
blocks: 8,
atime: 2017-02-27T10:01:19.000Z,
mtime: 2017-02-27T10:01:19.000Z,
ctime: 2017-02-27T10:01:19.050Z,
birthtime: 2017-02-27T10:01:19.050Z }
SOLINK_MODULE(target) Release/obj.target/bcrypt_lib.node
COPY Release/bcrypt_lib.node
COPY /home/shivaraj/bitbucket/freshersuniverse-middleware/node_modules/bcrypt/lib/binding/bcrypt_lib.node
TOUCH Release/obj.target/action_after_build.stamp
Release/obj.target/action_after_build.stamp { dev: 2055,
mode: 33204,
nlink: 1,
uid: 1000,
gid: 1000,
rdev: 0,
blksize: 4096,
ino: 1837690,
size: 0,
blocks: 0,
atime: 2017-02-27T10:01:22.000Z,
mtime: 2017-02-27T10:01:22.000Z,
ctime: 2017-02-27T10:01:22.213Z,
birthtime: 2017-02-27T10:01:22.213Z }
make: Leaving directory '/home/shivaraj/bitbucket/freshersuniverse-middleware/node_modules/bcrypt/build'
f
Most helpful comment
Same problem.
Ubuntu 16.04 LTS
Node 4.4.7
npm 2.15.8
bcrypt 1.0.2
node-pre-gyp ERR! Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v1.0.2/bcrypt_lib-v1.0.2-node-v46-linux-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v46 ABI) (falling
back to source compile with node-gyp)