Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm warning - SKIPPING OPTIONAL DEPENDENCY: [email protected] #3231

Closed
listenaddress opened this issue Nov 22, 2019 · 1 comment
Closed

Comments

@listenaddress
Copy link

In Docker I'm getting the scrypt install warnings below, similar to this error #2992.

My npm i process finishes and it seems like these warnings may be ok since we get the logs at the bottom that say npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected].

Is this correct to assume?

We're getting this error when we try to install our node modules inside Docker (https://github.com/openworklabs/quasar/blob/078b648b1ad3d918940d585640360b4d216f8e83/Dockerfile#L14).

> [email protected] preinstall /home/node/quasar/node_modules/scrypt
> node node-scrypt-preinstall.js


> [email protected] install /home/node/quasar/node_modules/keccak
> npm run rebuild || echo "Keccak bindings compilation fail. Pure JS implementation will be used."


> [email protected] rebuild /home/node/quasar/node_modules/keccak

> node-gyp rebuild

make: Entering directory '/home/node/quasar/node_modules/keccak/build'
  CXX(target) Release/obj.target/keccak/src/addon.o
../src/addon.cc: In static member function 'static Nan::NAN_METHOD_RETURN_TYPE KeccakWrapper::Initialize(Nan::NAN_METHOD_ARGS_TYPE)':
../src/addon.cc:37:47: error: no matching function for call to 'v8::Value::IntegerValue()'
     unsigned int rate = info[0]->IntegerValue();
                                               ^
In file included from /home/node/.cache/node-gyp/12.13.0/include/node/node.h:63:0,
                 from ../src/addon.cc:1:
/home/node/.cache/node-gyp/12.13.0/include/node/v8.h:2609:40: note: candidate: v8::Maybe<long int> v8::Value::IntegerValue(v8::Local<v8::Context>) const
   V8_WARN_UNUSED_RESULT Maybe<int64_t> IntegerValue(
                                        ^~~~~~~~~~~~
/home/node/.cache/node-gyp/12.13.0/include/node/v8.h:2609:40: note:   candidate expects 1 argument, 0 provided
../src/addon.cc:38:51: error: no matching function for call to 'v8::Value::IntegerValue()'
     unsigned int capacity = info[1]->IntegerValue();
                                                   ^
In file included from /home/node/.cache/node-gyp/12.13.0/include/node/node.h:63:0,
                 from ../src/addon.cc:1:
/home/node/.cache/node-gyp/12.13.0/include/node/v8.h:2609:40: note: candidate: v8::Maybe<long int> v8::Value::IntegerValue(v8::Local<v8::Context>) const
   V8_WARN_UNUSED_RESULT Maybe<int64_t> IntegerValue(
                                        ^~~~~~~~~~~~
/home/node/.cache/node-gyp/12.13.0/include/node/v8.h:2609:40: note:   candidate expects 1 argument, 0 provided
../src/addon.cc: In static member function 'static Nan::NAN_METHOD_RETURN_TYPE KeccakWrapper::AbsorbLastFewBits(Nan::NAN_METHOD_ARGS_TYPE)':
../src/addon.cc:56:48: error: no matching function for call to 'v8::Value::IntegerValue()'
     unsigned char bits = info[0]->IntegerValue();
                                                ^
In file included from /home/node/.cache/node-gyp/12.13.0/include/node/node.h:63:0,
                 from ../src/addon.cc:1:
/home/node/.cache/node-gyp/12.13.0/include/node/v8.h:2609:40: note: candidate: v8::Maybe<long int> v8::Value::IntegerValue(v8::Local<v8::Context>) const
   V8_WARN_UNUSED_RESULT Maybe<int64_t> IntegerValue(
                                        ^~~~~~~~~~~~
/home/node/.cache/node-gyp/12.13.0/include/node/v8.h:2609:40: note:   candidate expects 1 argument, 0 provided
../src/addon.cc: In static member function 'static Nan::NAN_METHOD_RETURN_TYPE KeccakWrapper::Squeeze(Nan::NAN_METHOD_ARGS_TYPE)':
../src/addon.cc:64:43: error: no matching function for call to 'v8::Value::IntegerValue()'
     size_t length = info[0]->IntegerValue();
                                           ^
In file included from /home/node/.cache/node-gyp/12.13.0/include/node/node.h:63:0,
                 from ../src/addon.cc:1:
/home/node/.cache/node-gyp/12.13.0/include/node/v8.h:2609:40: note: candidate: v8::Maybe<long int> v8::Value::IntegerValue(v8::Local<v8::Context>) const
   V8_WARN_UNUSED_RESULT Maybe<int64_t> IntegerValue(
                                        ^~~~~~~~~~~~
/home/node/.cache/node-gyp/12.13.0/include/node/v8.h:2609:40: note:   candidate expects 1 argument, 0 provided
../src/addon.cc: In static member function 'static Nan::NAN_METHOD_RETURN_TYPE KeccakWrapper::Copy(Nan::NAN_METHOD_ARGS_TYPE)':
../src/addon.cc:75:82: error: no matching function for call to 'v8::Value::ToObject()'
     KeccakWrapper* to = Nan::ObjectWrap::Unwrap<KeccakWrapper>(info[0]->ToObject());
                                                                                  ^
In file included from /home/node/.cache/node-gyp/12.13.0/include/node/node.h:63:0,
                 from ../src/addon.cc:1:
/home/node/.cache/node-gyp/12.13.0/include/node/v8.h:2576:44: note: candidate: v8::MaybeLocal<v8::Object> v8::Value::ToObject(v8::Local<v8::Context>) const
   V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
                                            ^~~~~~~~
/home/node/.cache/node-gyp/12.13.0/include/node/v8.h:2576:44: note:   candidate expects 1 argument, 0 provided
In file included from /home/node/.cache/node-gyp/12.13.0/include/node/v8-internal.h:14:0,
                 from /home/node/.cache/node-gyp/12.13.0/include/node/v8.h:25,
                 from /home/node/.cache/node-gyp/12.13.0/include/node/node.h:63,
                 from ../src/addon.cc:1:
/home/node/.cache/node-gyp/12.13.0/include/node/v8.h:2590:31: note: candidate: v8::Local<v8::Object> v8::Value::ToObject(v8::Isolate*) const
                 Local<Object> ToObject(Isolate* isolate) const);
                               ^
/home/node/.cache/node-gyp/12.13.0/include/node/v8config.h:311:3: note: in definition of macro 'V8_DEPRECATED'
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
/home/node/.cache/node-gyp/12.13.0/include/node/v8.h:2590:31: note:   candidate expects 1 argument, 0 provided
                 Local<Object> ToObject(Isolate* isolate) const);
                               ^
/home/node/.cache/node-gyp/12.13.0/include/node/v8config.h:311:3: note: in definition of macro 'V8_DEPRECATED'
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
make: *** [Release/obj.target/keccak/src/addon.o] Error 1
keccak.target.mk:127: recipe for target 'Release/obj.target/keccak/src/addon.o' failed
make: Leaving directory '/home/node/quasar/node_modules/keccak/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:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:210:5)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Linux 4.9.184-linuxkit
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/node/quasar/node_modules/keccak
gyp ERR! node -v v12.13.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] rebuild: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] rebuild script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?



(...hundreds of similar lines later...)



> [email protected] postinstall /home/node/quasar/node_modules/web3
> node angular-patch.js

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/scrypt):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

Versions

Node: 12.13.0
Web3: 1.2.2
OS: MacOS Mojave 10.14.5 & Ubuntu 18.04

@nivida
Copy link
Contributor

nivida commented Nov 22, 2019

Duplication of #3151

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants