Error
yarn install v1.9.4 [1/4] Resolving packages... [2/4] Fetching packages... info [email protected]: The platform "linux" is incompatible with this module. info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation. [3/4] Linking dependencies... [4/4] Building fresh packages... [1/6] ⢀ sha3 [2/6] ⠠ secp256k1 [3/6] ⠠ keccak [-/6] ⠠ waiting... error /home/ubuntu/Lendflo-Commodo/charta/node_modules/sha3: Command failed. Exit code: 1 Command: node-gyp rebuild Arguments: Directory: /home/ubuntu/Lendflo-Commodo/charta/node_modules/sha3 Output: gyp info it worked if it ends with ok gyp info using [email protected] gyp info using [email protected] | linux | x64 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 info spawn /usr/bin/python2 gyp info spawn args [ '/home/ubuntu/.nvm/versions/node/v10.8.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py', gyp info spawn args 'binding.gyp', gyp info spawn args '-f', gyp info spawn args 'make', gyp info spawn args '-I', gyp info spawn args '/home/ubuntu/Lendflo-Commodo/charta/node_modules/sha3/build/config.gypi', gyp info spawn args '-I', gyp info spawn args '/home/ubuntu/.nvm/versions/node/v10.8.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi', gyp info spawn args '-I', gyp info spawn args '/home/ubuntu/.node-gyp/10.8.0/include/node/common.gypi', gyp info spawn args '-Dlibrary=shared_library', gyp info spawn args '-Dvisibility=default', gyp info spawn args '-Dnode_root_dir=/home/ubuntu/.node-gyp/10.8.0', gyp info spawn args '-Dnode_gyp_dir=/home/ubuntu/.nvm/versions/node/v10.8.0/lib/node_modules/npm/node_modules/node-gyp', gyp info spawn args '-Dnode_lib_file=/home/ubuntu/.node-gyp/10.8.0/<(target_arch)/node.lib', gyp info spawn args '-Dmodule_root_dir=/home/ubuntu/Lendflo-Commodo/charta/node_modules/sha3', gyp info spawn args '-Dnode_engine=v8', gyp info spawn args '--depth=.', gyp info spawn args '--no-parallel', gyp info spawn args '--generator-output', gyp info spawn args 'build', gyp info spawn args '-Goutput_dir=.' ] gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR gyp info spawn make gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ] make: Entering directory '/home/ubuntu/Lendflo-Commodo/charta/node_modules/sha3/build' CXX(target) Release/obj.target/sha3/src/addon.o In file included from ../src/addon.cpp:4:0: ../../nan/nan.h: In function ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’: ../../nan/nan.h:840:60: warning: ‘v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations] v8::Isolate::GetCurrent(), target, func, argc, argv); ^ In file included from ../src/addon.cpp:1:0: /home/ubuntu/.node-gyp/10.8.0/include/node/node.h:172:50: note: declared here NODE_EXTERN v8::Local<v8::Value> MakeCallback( ^ /home/ubuntu/.node-gyp/10.8.0/include/node/node.h:88:42: note: in definition of macro ‘NODE_DEPRECATED’ __attribute__((deprecated(message))) declarator ^~~~~~~~~~ In file included from ../src/addon.cpp:4:0: ../../nan/nan.h: In function ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)’: ../../nan/nan.h:855:62: warning: ‘v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)’ is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations] v8::Isolate::GetCurrent(), target, symbol, argc, argv); ^ In file included from ../src/addon.cpp:1:0: /home/ubuntu/.node-gyp/10.8.0/include/node/node.h:165:50: note: declared here NODE_EXTERN v8::Local<v8::Value> MakeCallback( ^ /home/ubuntu/.node-gyp/10.8.0/include/node/node.h:88:42: note: in definition of macro ‘NODE_DEPRECATED’ __attribute__((deprecated(message))) declarator ^~~~~~~~~~ In file included from ../src/addon.cpp:4:0: ../../nan/nan.h: In function ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, const char*, int, v8::Local<v8::Value>*)’: ../../nan/nan.h:870:62: warning: ‘v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, const char*, int, v8::Local<v8::Value>*)’ is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations] v8::Isolate::GetCurrent(), target, method, argc, argv); ^ In file included from ../src/addon.cpp:1:0: /home/ubuntu/.node-gyp/10.8.0/include/node/node.h:158:50: note: declared here NODE_EXTERN v8::Local<v8::Value> MakeCallback( ^ /home/ubuntu/.node-gyp/10.8.0/include/node/node.h:88:42: note: in definition of macro ‘NODE_DEPRECATED’ __attribute__((deprecated(message))) declarator ^~~~~~~~~~ In file included from ../src/addon.cpp:4:0: ../../nan/nan.h: In member function ‘v8::Local<v8::Value> Nan::Callback::Call_(v8::Isolate*, v8::Local<v8::Object>, int, v8::Local<v8::Value>*) const’: ../../nan/nan.h:1484:5: warning: ‘v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations] )); ^ In file included from ../src/addon.cpp:1:0: /home/ubuntu/.node-gyp/10.8.0/include/node/node.h:172:50: note: declared here NODE_EXTERN v8::Local<v8::Value> MakeCallback( ^ /home/ubuntu/.node-gyp/10.8.0/include/node/node.h:88:42: note: in definition of macro ‘NODE_DEPRECATED’ __attribute__((deprecated(message))) declarator ^~~~~~~~~~ ../src/addon.cpp: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE SHA3Hash::New(Nan::NAN_METHOD_ARGS_TYPE)’: ../src/addon.cpp:59:58: error: no matching function for call to ‘v8::Function::NewInstance(const int&, v8::Local<v8::Value> [1])’ info.GetReturnValue().Set(cons->NewInstance(argc, argv)); ^ In file included from /home/ubuntu/.node-gyp/10.8.0/include/node/node.h:63:0, from ../src/addon.cpp:1: /home/ubuntu/.node-gyp/10.8.0/include/node/v8.h:3953:44: note: candidate: v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>, int, v8::Local<v8::Value>*) const V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance( ^~~~~~~~~~~ /home/ubuntu/.node-gyp/10.8.0/include/node/v8.h:3953:44: note: candidate expects 3 arguments, 2 provided /home/ubuntu/.node-gyp/10.8.0/include/node/v8.h:3956:44: note: candidate: v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>) const V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance( ^~~~~~~~~~~ /home/ubuntu/.node-gyp/10.8.0/include/node/v8.h:3956:44: note: candidate expects 1 argument, 2 provided sha3.target.mk:105: recipe for target 'Release/obj.target/sha3/src/addon.o' failed make: Leaving directory '/home/ubuntu/Lendflo-Commodo/charta/node_modules/sha3/build' make: *** [Release/obj.target/sha3/src/addon.o] Error 1 gyp ERR! build error gyp ERR! stack Error:
make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/home/ubuntu/.nvm/versions/node/v10.8.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23) gyp ERR! stack at ChildProcess.emit (events.js:182:13) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:238:12) gyp ERR! System Linux 4.4.0-1066-aws gyp ERR! command "/home/ubuntu/.nvm/versions/node/v10.8.0/bin/node" "/home/ubuntu/.nvm/versions/node/v10.8.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /home/ubuntu/Lendflo-Commodo/charta/node_modules/sha3
Diagnosed Problem
Not sure :/
Solution
Remove both yarn.lock
and package-lock.json
from the home repo. Then yarn install