meteor-restivus
meteor-restivus copied to clipboard
npm bcrypt error : [email protected]
after updating to [email protected], I am unable to add nimble:restivus to a new project. Here is the error log while adding the package.
$ meteor add nimble:restivus
=> Errors while adding packages:
While loading package [email protected]_2:
error: Command failed:
/Users/gunjansoni/.meteor/packages/meteor-tool/.1.4.1_1.19k3p0s++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/bin/npm
rebuild --no-bin-links --update-binary
../src/bcrypt_node.cc:54:18: error: no member named 'Dispose' in
'v8::Persistent<v8::Function, v8::NonCopyablePersistentTraits<v8::Function>
>'
callback.Dispose();
~~~~~~~~ ^
../src/bcrypt_node.cc:128:19: error: unknown type name 'uv_work_t'
void GenSaltAsync(uv_work_t* req) {
^
../src/bcrypt_node.cc:137:24: error: unknown type name 'uv_work_t'
void GenSaltAsyncAfter(uv_work_t* req) {
^
../src/bcrypt_node.cc:138:17: error: calling a protected constructor of class
'v8::HandleScope'
HandleScope scope;
^
/Users/gunjansoni/.node-gyp/4.5.0/include/node/v8.h:885:13: note: declared
protected here
V8_INLINE HandleScope() {}
^
../src/bcrypt_node.cc:146:44: error: no member named 'New' in
'v8::String'
argv[0] =
Exception::Error(String::New(baton->error.c_str()));
~~~~~~~~^
../src/bcrypt_node.cc:147:19: error: no matching function for call to
'Undefined'
argv[1] = Undefined();
^~~~~~~~~
/Users/gunjansoni/.node-gyp/4.5.0/include/node/v8.h:315:27: note: candidate
function not viable: requires single argument 'isolate', but no arguments were
provided
friend Local<Primitive> Undefined(Isolate* isolate);
^
../src/bcrypt_node.cc:150:19: error: no matching function for call to
'Undefined'
argv[0] = Undefined();
^~~~~~~~~
/Users/gunjansoni/.node-gyp/4.5.0/include/node/v8.h:315:27: note: candidate
function not viable: requires single argument 'isolate', but no arguments were
provided
friend Local<Primitive> Undefined(Isolate* isolate);
^
../src/bcrypt_node.cc:151:19: warning: 'Encode' is deprecated: Use
Encode(isolate, ...) [-Wdeprecated-declarations]
argv[1] = Encode(baton->salt.c_str(), baton->salt.size(),
BINARY);
^
/Users/gunjansoni/.node-gyp/4.5.0/include/node/node.h:300:45: note: 'Encode'
has been explicitly marked deprecated here
inline v8::Local<v8::Value> Encode(
^
../src/bcrypt_node.cc:156:20: error: member reference type
'v8::Persistent<v8::Function>' is not a pointer; did you mean to use '.'?
baton->callback->Call(Context::GetCurrent()->Global(), 2, argv);
~~~~~~~~~~~~~~~^~
.
../src/bcrypt_node.cc:156:22: error: no member named 'Call' in
'v8::Persistent<v8::Function, v8::NonCopyablePersistentTraits<v8::Function>
>'
baton->callback->Call(Context::GetCurrent()->Global(), 2, argv);
~~~~~~~~~~~~~~~ ^
../src/bcrypt_node.cc:156:36: error: no member named 'GetCurrent' in
'v8::Context'
baton->callback->Call(Context::GetCurrent()->Global(), 2,
argv);
~~~~~~~~~^
../src/bcrypt_node.cc:159:9: warning: 'FatalException' is deprecated: Use
FatalException(isolate, ...) [-Wdeprecated-declarations]
FatalException(try_catch);
^
/Users/gunjansoni/.node-gyp/4.5.0/include/node/node.h:284:29: note:
'FatalException' has been explicitly marked deprecated here
inline void FatalException(const v8::TryCatch& try_catch)
{
^
../src/bcrypt_node.cc:164:34: error: unknown type name 'Arguments'; did you
mean 'v8::internal::Arguments'?
Handle<Value> GenerateSalt(const Arguments &args)
{
^~~~~~~~~
v8::internal::Arguments
/Users/gunjansoni/.node-gyp/4.5.0/include/node/v8.h:139:7: note:
'v8::internal::Arguments' declared here
class Arguments;
^
../src/bcrypt_node.cc:165:17: error: calling a protected constructor of class
'v8::HandleScope'
HandleScope scope;
^
/Users/gunjansoni/.node-gyp/4.5.0/include/node/v8.h:885:13: note: declared
protected here
V8_INLINE HandleScope() {}
^
../src/bcrypt_node.cc:167:13: error: member access into incomplete type 'const
v8::internal::Arguments'
if (args.Length() < 3) {
^
/Users/gunjansoni/.node-gyp/4.5.0/include/node/v8.h:139:7: note: forward
declaration of 'v8::internal::Arguments'
class Arguments;
^
../src/bcrypt_node.cc:168:60: error: no member named 'New' in
'v8::String'
return ThrowException(Exception::TypeError(String::New("3 arguments
expected")));
~~~~~~~~^
../src/bcrypt_node.cc:171:34: error: type 'const v8::internal::Arguments' does
not provide a subscript operator
if (!Buffer::HasInstance(args[1]) || Buffer::Length(args[1].As<Object>()) !=
16) {
~~~~^~
../src/bcrypt_node.cc:171:61: error: type 'const v8::internal::Arguments' does
not provide a subscript operator
if (!Buffer::HasInstance(args[1]) || Buffer::Length(args[1].As<Object>()) !=
16) {
~~~~^~
../src/bcrypt_node.cc:171:68: error: 'Object' does not refer to a value
if (!Buffer::HasInstance(args[1]) || Buffer::Length(args[1].As<Object>()) !=
16) {
^
/Users/gunjansoni/.node-gyp/4.5.0/include/node/v8.h:2587:17: note: declared
here
class V8_EXPORT Object : public Value {
^
../src/bcrypt_node.cc:171:76: error: expected expression
if (!Buffer::HasInstance(args[1]) || Buffer::Length(args[1].As<Object>()) !=
16)
{
^
../src/bcrypt_node.cc:172:60: error: no member named 'New' in
'v8::String'
return ThrowException(Exception::TypeError(String::New("Second argument must be
a 16 byte Buffer")));
~~~~~~~~^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
2 warnings and 20 errors generated.
make: *** [Release/obj.target/bcrypt_lib/src/bcrypt_node.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit
(/Users/gunjansoni/.meteor/packages/meteor-tool/.1.4.1_1.19k3p0s++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit
(internal/child_process.js:200:12)
gyp ERR! System Darwin 16.0.0
gyp ERR! command
"/Users/gunjansoni/.meteor/packages/meteor-tool/.1.4.1_1.19k3p0s++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/bin/node"
"/Users/gunjansoni/.meteor/packages/meteor-tool/.1.4.1_1.19k3p0s++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"
"rebuild"
gyp ERR! cwd
/Users/gunjansoni/.meteor/packages/npm-bcrypt/.0.7.8_2.6deeg8++os.linux.x86_64+os.osx.x86_64+web.browser+web.cordova/npm/node_modules/.temp-1311606/node_modules/bcrypt
gyp ERR! node -v v4.5.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm ERR! Darwin 16.0.0
npm ERR! argv
"/Users/gunjansoni/.meteor/packages/meteor-tool/.1.4.1_1.19k3p0s++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/bin/node"
"/Users/gunjansoni/.meteor/packages/meteor-tool/.1.4.1_1.19k3p0s++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/bin/npm"
"rebuild" "--no-bin-links" "--update-binary"
npm ERR! node v4.5.0
npm ERR! npm v3.10.6
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 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/gunjansoni/.meteor/packages/npm-bcrypt/.0.7.8_2.6deeg8++os.linux.x86_64+os.osx.x86_64+web.browser+web.cordova/npm/node_modules/.temp-1311606/npm-debug.log
../src/bcrypt_node.cc:54:18: error: no member named 'Dispose' in
'v8::Persistent<v8::Function, v8::NonCopyablePersistentTraits<v8::Function>
>'
callback.Dispose();
~~~~~~~~ ^
../src/bcrypt_node.cc:128:19: error: unknown type name 'uv_work_t'
void GenSaltAsync(uv_work_t* req) {
^
../src/bcrypt_node.cc:137:24: error: unknown type name 'uv_work_t'
void GenSaltAsyncAfter(uv_work_t* req) {
^
../src/bcrypt_node.cc:138:17: error: calling a protected constructor of class
'v8::HandleScope'
HandleScope scope;
^
/Users/gunjansoni/.node-gyp/4.5.0/include/node/v8.h:885:13: note: declared
protected here
V8_INLINE HandleScope() {}
^
../src/bcrypt_node.cc:146:44: error: no member named 'New' in
'v8::String'
argv[0] =
Exception::Error(String::New(baton->error.c_str()));
~~~~~~~~^
../src/bcrypt_node.cc:147:19: error: no matching function for call to
'Undefined'
argv[1] = Undefined();
^~~~~~~~~
/Users/gunjansoni/.node-gyp/4.5.0/include/node/v8.h:315:27: note: candidate
function not viable: requires single argument 'isolate', but no arguments were
provided
friend Local<Primitive> Undefined(Isolate* isolate);
^
../src/bcrypt_node.cc:150:19: error: no matching function for call to
'Undefined'
argv[0] = Undefined();
^~~~~~~~~
/Users/gunjansoni/.node-gyp/4.5.0/include/node/v8.h:315:27: note: candidate
function not viable: requires single argument 'isolate', but no arguments were
provided
friend Local<Primitive> Undefined(Isolate* isolate);
^
../src/bcrypt_node.cc:151:19: warning: 'Encode' is deprecated: Use
Encode(isolate, ...) [-Wdeprecated-declarations]
argv[1] = Encode(baton->salt.c_str(), baton->salt.size(),
BINARY);
^
/Users/gunjansoni/.node-gyp/4.5.0/include/node/node.h:300:45: note: 'Encode'
has been explicitly marked deprecated here
inline v8::Local<v8::Value> Encode(
^
../src/bcrypt_node.cc:156:20: error: member reference type
'v8::Persistent<v8::Function>' is not a pointer; did you mean to use '.'?
baton->callback->Call(Context::GetCurrent()->Global(), 2, argv);
~~~~~~~~~~~~~~~^~
.
../src/bcrypt_node.cc:156:22: error: no member named 'Call' in
'v8::Persistent<v8::Function, v8::NonCopyablePersistentTraits<v8::Function>
>'
baton->callback->Call(Context::GetCurrent()->Global(), 2, argv);
~~~~~~~~~~~~~~~ ^
../src/bcrypt_node.cc:156:36: error: no member named 'GetCurrent' in
'v8::Context'
baton->callback->Call(Context::GetCurrent()->Global(), 2,
argv);
~~~~~~~~~^
../src/bcrypt_node.cc:159:9: warning: 'FatalException' is deprecated: Use
FatalException(isolate, ...) [-Wdeprecated-declarations]
FatalException(try_catch);
^
/Users/gunjansoni/.node-gyp/4.5.0/include/node/node.h:284:29: note:
'FatalException' has been explicitly marked deprecated here
inline void FatalException(const v8::TryCatch& try_catch)
{
^
../src/bcrypt_node.cc:164:34: error: unknown type name 'Arguments'; did you
mean 'v8::internal::Arguments'?
Handle<Value> GenerateSalt(const Arguments &args)
{
^~~~~~~~~
v8::internal::Arguments
/Users/gunjansoni/.node-gyp/4.5.0/include/node/v8.h:139:7: note:
'v8::internal::Arguments' declared here
class Arguments;
^
../src/bcrypt_node.cc:165:17: error: calling a protected constructor of class
'v8::HandleScope'
HandleScope scope;
^
/Users/gunjansoni/.node-gyp/4.5.0/include/node/v8.h:885:13: note: declared
protected here
V8_INLINE HandleScope() {}
^
../src/bcrypt_node.cc:167:13: error: member access into incomplete type 'const
v8::internal::Arguments'
if (args.Length() < 3) {
^
/Users/gunjansoni/.node-gyp/4.5.0/include/node/v8.h:139:7: note: forward
declaration of 'v8::internal::Arguments'
class Arguments;
^
../src/bcrypt_node.cc:168:60: error: no member named 'New' in
'v8::String'
return ThrowException(Exception::TypeError(String::New("3 arguments
expected")));
~~~~~~~~^
../src/bcrypt_node.cc:171:34: error: type 'const v8::internal::Arguments' does
not provide a subscript operator
if (!Buffer::HasInstance(args[1]) || Buffer::Length(args[1].As<Object>()) !=
16) {
~~~~^~
../src/bcrypt_node.cc:171:61: error: type 'const v8::internal::Arguments' does
not provide a subscript operator
if (!Buffer::HasInstance(args[1]) || Buffer::Length(args[1].As<Object>()) !=
16) {
~~~~^~
../src/bcrypt_node.cc:171:68: error: 'Object' does not refer to a value
if (!Buffer::HasInstance(args[1]) || Buffer::Length(args[1].As<Object>()) !=
16) {
^
/Users/gunjansoni/.node-gyp/4.5.0/include/node/v8.h:2587:17: note: declared
here
class V8_EXPORT Object : public Value {
^
../src/bcrypt_node.cc:171:76: error: expected expression
if (!Buffer::HasInstance(args[1]) || Buffer::Length(args[1].As<Object>()) !=
16)
{
^
../src/bcrypt_node.cc:172:60: error: no member named 'New' in
'v8::String'
return ThrowException(Exception::TypeError(String::New("Second argument must be
a 16 byte Buffer")));
~~~~~~~~^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
2 warnings and 20 errors generated.
make: *** [Release/obj.target/bcrypt_lib/src/bcrypt_node.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit
(/Users/gunjansoni/.meteor/packages/meteor-tool/.1.4.1_1.19k3p0s++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit
(internal/child_process.js:200:12)
gyp ERR! System Darwin 16.0.0
gyp ERR! command
"/Users/gunjansoni/.meteor/packages/meteor-tool/.1.4.1_1.19k3p0s++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/bin/node"
"/Users/gunjansoni/.meteor/packages/meteor-tool/.1.4.1_1.19k3p0s++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"
"rebuild"
gyp ERR! cwd
/Users/gunjansoni/.meteor/packages/npm-bcrypt/.0.7.8_2.6deeg8++os.linux.x86_64+os.osx.x86_64+web.browser+web.cordova/npm/node_modules/.temp-1311606/node_modules/bcrypt
gyp ERR! node -v v4.5.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm ERR! Darwin 16.0.0
npm ERR! argv
"/Users/gunjansoni/.meteor/packages/meteor-tool/.1.4.1_1.19k3p0s++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/bin/node"
"/Users/gunjansoni/.meteor/packages/meteor-tool/.1.4.1_1.19k3p0s++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/bin/npm"
"rebuild" "--no-bin-links" "--update-binary"
npm ERR! node v4.5.0
npm ERR! npm v3.10.6
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 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/gunjansoni/.meteor/packages/npm-bcrypt/.0.7.8_2.6deeg8++os.linux.x86_64+os.osx.x86_64+web.browser+web.cordova/npm/node_modules/.temp-1311606/npm-debug.log
Here are the dependencies that I have installed and is in my package.json
"bcrypt": "^0.8.7",
"lodash": "^4.15.0",
"meteor-node-stubs": "~0.2.0",
"moment": "^2.14.1"
Sorry, My bad.
added accounts-package before adding nimble:restivus and it resolved.
Hey @guns2410. What version of Restivus are you using? This should be resolved in v0.8.7, when the dependency was explicitly declared in Restivus.
I also able to resolved this by adding accounts-base and accounts password (both needed). Else, i'd get the same error mentioned by @guns2410
+1 I'm still getting this with meteor 1.4.1.1 and the latest restivus 0.8.11 . I had to add meteor add npm-bcrypt
instead of npm install --save bcrypt
which is the recommended module. Can we reopen this issue?
👍
+1 I got this error with meteor 1.4.
It's the version constraints set for accounts-apsswrd in package.js, it tries to install an outdated bcrypt. see: https://github.com/kahmali/meteor-restivus/issues/253