dvandal / cryptonote-nodejs-pool

Mining pool for all CryptoNote based coins using Cryptonight, Cryptonight Light and Cryptonight Heavy algorithms
GNU General Public License v2.0
364 stars 610 forks source link

Error during npm update #671

Open andreyoit opened 3 years ago

andreyoit commented 3 years ago

I'm trying to build the source, but I still get an error during npm update.

npm ERR! code 1
npm ERR! git dep preparation failed
npm ERR! command /usr/bin/node /usr/lib/node_modules/npm/bin/npm-cli.js install --force --cache=/home/pool/.npm --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit
npm ERR! npm WARN using --force Recommended protections disabled.
npm ERR! npm ERR! code 1
npm ERR! npm ERR! path /home/pool/.npm/_cacache/tmp/git-clone-409085e3/node_modules/tiny-secp256k1
npm ERR! npm ERR! command failed
npm ERR! npm ERR! command sh -c node-gyp rebuild
npm ERR! npm ERR! make: Entering directory '/home/pool/.npm/_cacache/tmp/git-clone-409085e3/node_modules/tiny-secp256k1/build'
npm ERR! npm ERR!   CXX(target) Release/obj.target/secp256k1/native/addon.o
npm ERR! npm ERR! make: Leaving directory '/home/pool/.npm/_cacache/tmp/git-clone-409085e3/node_modules/tiny-secp256k1/build'
npm ERR! npm ERR! gyp info it worked if it ends with ok
npm ERR! npm ERR! gyp info using node-gyp@7.1.2
npm ERR! npm ERR! gyp info using node@15.14.0 | linux | x64
npm ERR! npm ERR! gyp info find Python using Python version 3.8.5 found at "/usr/bin/python3"
npm ERR! npm ERR! gyp info spawn /usr/bin/python3
npm ERR! npm ERR! gyp info spawn args [
npm ERR! npm ERR! gyp info spawn args   '/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! npm ERR! gyp info spawn args   '-f',
npm ERR! npm ERR! gyp info spawn args   'make',
npm ERR! npm ERR! gyp info spawn args   '-I',
npm ERR! npm ERR! gyp info spawn args   '/home/pool/.npm/_cacache/tmp/git-clone-409085e3/node_modules/tiny-secp256k1/build/config.gypi',
npm ERR! npm ERR! gyp info spawn args   '-I',
npm ERR! npm ERR! gyp info spawn args   '/usr/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! npm ERR! gyp info spawn args   '-I',
npm ERR! npm ERR! gyp info spawn args   '/home/pool/.cache/node-gyp/15.14.0/include/node/common.gypi',
npm ERR! npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! npm ERR! gyp info spawn args   '-Dnode_root_dir=/home/pool/.cache/node-gyp/15.14.0',
npm ERR! npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/usr/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! npm ERR! gyp info spawn args   '-Dnode_lib_file=/home/pool/.cache/node-gyp/15.14.0/<(target_arch)/node.lib',
npm ERR! npm ERR! gyp info spawn args   '-Dmodule_root_dir=/home/pool/.npm/_cacache/tmp/git-clone-409085e3/node_modules/tiny-secp256k1',
npm ERR! npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! npm ERR! gyp info spawn args   '--depth=.',
npm ERR! npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! npm ERR! gyp info spawn args   '--generator-output',
npm ERR! npm ERR! gyp info spawn args   'build',
npm ERR! npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! npm ERR! gyp info spawn args ]
npm ERR! npm ERR! gyp info spawn make
npm ERR! npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! npm ERR! In file included from ../native/addon.cpp:4:
npm ERR! npm ERR! ../../nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’:
npm ERR! npm ERR! ../../nan/nan.h:2298:62: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
npm ERR! npm ERR!  2298 |     , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
npm ERR! npm ERR!       |                                                              ^
npm ERR! npm ERR! ../native/addon.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE ecdsaVerify(Nan::NAN_METHOD_ARGS_TYPE)’:
npm ERR! npm ERR! ../native/addon.cpp:320:56: error: cannot convert ‘v8::Local<v8::Context>’ to ‘v8::Isolate*’
npm ERR! npm ERR!   320 |   strict = info[3]->BooleanValue(Nan::GetCurrentContext()).FromJust();
npm ERR! npm ERR!       |                                  ~~~~~~~~~~~~~~~~~~~~~~^~
npm ERR! npm ERR!       |                                                        |
npm ERR! npm ERR!       |                                                        v8::Local<v8::Context>
npm ERR! npm ERR! In file included from /home/pool/.cache/node-gyp/15.14.0/include/node/node.h:63,
npm ERR! npm ERR!                  from ../../nan/nan.h:54,
npm ERR! npm ERR!                  from ../native/addon.cpp:4:
npm ERR! npm ERR! /home/pool/.cache/node-gyp/15.14.0/include/node/v8.h:2904:30: note:   initializing argument 1 of ‘bool v8::Value::BooleanValue(v8::Isolate*) const’
npm ERR! npm ERR!  2904 |   bool BooleanValue(Isolate* isolate) const;
npm ERR! npm ERR!       |                     ~~~~~~~~~^~~~~~~
npm ERR! npm ERR! In file included from ../../nan/nan.h:54,
npm ERR! npm ERR!                  from ../native/addon.cpp:4:
npm ERR! npm ERR! ../native/addon.cpp: At global scope:
npm ERR! npm ERR! /home/pool/.cache/node-gyp/15.14.0/include/node/node.h:838:43: warning: cast between incompatible function types from ‘void (*)(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’ {aka ‘void (*)(v8::Local<v8::Object>)’} to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type]
npm ERR! npm ERR!   838 |       (node::addon_register_func) (regfunc),                          \
npm ERR! npm ERR!       |                                           ^
npm ERR! npm ERR! /home/pool/.cache/node-gyp/15.14.0/include/node/node.h:872:3: note: in expansion of macro ‘NODE_MODULE_X’
npm ERR! npm ERR!   872 |   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
npm ERR! npm ERR!       |   ^~~~~~~~~~~~~
npm ERR! npm ERR! ../native/addon.cpp:359:1: note: in expansion of macro ‘NODE_MODULE’
npm ERR! npm ERR!   359 | NODE_MODULE(secp256k1, Init)
npm ERR! npm ERR!       | ^~~~~~~~~~~
npm ERR! npm ERR! ../native/addon.cpp: In instantiation of ‘unsigned int {anonymous}::assumeCompression(const I&, const A&) [with long unsigned int index = 2; I = Nan::FunctionCallbackInfo<v8::Value>; A = v8::Local<v8::Object>]’:
npm ERR! npm ERR! ../native/addon.cpp:142:50:   required from here
npm ERR! npm ERR! ../native/addon.cpp:80:21: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Wsign-compare]
npm ERR! npm ERR!    80 |   if (info.Length() <= index) return __isPointCompressed(p) ? SECP256K1_EC_COMPRESSED : SECP256K1_EC_UNCOMPRESSED;
npm ERR! npm ERR! ../native/addon.cpp:82:58: error: cannot convert ‘v8::Local<v8::Context>’ to ‘v8::Isolate*’
npm ERR! npm ERR!    82 |   return info[index]->BooleanValue(Nan::GetCurrentContext()).FromJust() ? SECP256K1_EC_COMPRESSED : SECP256K1_EC_UNCOMPRESSED;
npm ERR! npm ERR!       |                                    ~~~~~~~~~~~~~~~~~~~~~~^~
npm ERR! npm ERR!       |                                                          |
npm ERR! npm ERR!       |                                                          v8::Local<v8::Context>
npm ERR! npm ERR! In file included from /home/pool/.cache/node-gyp/15.14.0/include/node/node.h:63,
npm ERR! npm ERR!                  from ../../nan/nan.h:54,
npm ERR! npm ERR!                  from ../native/addon.cpp:4:
npm ERR! npm ERR! /home/pool/.cache/node-gyp/15.14.0/include/node/v8.h:2904:30: note:   initializing argument 1 of ‘bool v8::Value::BooleanValue(v8::Isolate*) const’
npm ERR! npm ERR!  2904 |   bool BooleanValue(Isolate* isolate) const;
npm ERR! npm ERR!       |                     ~~~~~~~~~^~~~~~~
npm ERR! npm ERR! ../native/addon.cpp: In instantiation of ‘unsigned int {anonymous}::assumeCompression(const I&, const A&) [with long unsigned int index = 1; I = Nan::FunctionCallbackInfo<v8::Value>; A = v8::Local<v8::Object>]’:
npm ERR! npm ERR! ../native/addon.cpp:174:49:   required from here
npm ERR! npm ERR! ../native/addon.cpp:80:21: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Wsign-compare]
npm ERR! npm ERR!    80 |   if (info.Length() <= index) return __isPointCompressed(p) ? SECP256K1_EC_COMPRESSED : SECP256K1_EC_UNCOMPRESSED;
npm ERR! npm ERR! ../native/addon.cpp:82:58: error: cannot convert ‘v8::Local<v8::Context>’ to ‘v8::Isolate*’
npm ERR! npm ERR!    82 |   return info[index]->BooleanValue(Nan::GetCurrentContext()).FromJust() ? SECP256K1_EC_COMPRESSED : SECP256K1_EC_UNCOMPRESSED;
npm ERR! npm ERR!       |                                    ~~~~~~~~~~~~~~~~~~~~~~^~
npm ERR! npm ERR!       |                                                          |
npm ERR! npm ERR!       |                                                          v8::Local<v8::Context>
npm ERR! npm ERR! In file included from /home/pool/.cache/node-gyp/15.14.0/include/node/node.h:63,
npm ERR! npm ERR!                  from ../../nan/nan.h:54,
npm ERR! npm ERR!                  from ../native/addon.cpp:4:
npm ERR! npm ERR! /home/pool/.cache/node-gyp/15.14.0/include/node/v8.h:2904:30: note:   initializing argument 1 of ‘bool v8::Value::BooleanValue(v8::Isolate*) const’
npm ERR! npm ERR!  2904 |   bool BooleanValue(Isolate* isolate) const;
npm ERR! npm ERR!       |                     ~~~~~~~~~^~~~~~~
npm ERR! npm ERR! ../native/addon.cpp: In instantiation of ‘unsigned int {anonymous}::assumeCompression(const I&) [with long unsigned int index = 1; I = Nan::FunctionCallbackInfo<v8::Value>]’:
npm ERR! npm ERR! ../native/addon.cpp:189:46:   required from here
npm ERR! npm ERR! ../native/addon.cpp:87:21: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Wsign-compare]
npm ERR! npm ERR!    87 |   if (info.Length() <= index) return SECP256K1_EC_COMPRESSED;
npm ERR! npm ERR! ../native/addon.cpp:89:58: error: cannot convert ‘v8::Local<v8::Context>’ to ‘v8::Isolate*’
npm ERR! npm ERR!    89 |   return info[index]->BooleanValue(Nan::GetCurrentContext()).FromJust() ? SECP256K1_EC_COMPRESSED : SECP256K1_EC_UNCOMPRESSED;
npm ERR! npm ERR!       |                                    ~~~~~~~~~~~~~~~~~~~~~~^~
npm ERR! npm ERR!       |                                                          |
npm ERR! npm ERR!       |                                                          v8::Local<v8::Context>
npm ERR! npm ERR! In file included from /home/pool/.cache/node-gyp/15.14.0/include/node/node.h:63,
npm ERR! npm ERR!                  from ../../nan/nan.h:54,
npm ERR! npm ERR!                  from ../native/addon.cpp:4:
npm ERR! npm ERR! /home/pool/.cache/node-gyp/15.14.0/include/node/v8.h:2904:30: note:   initializing argument 1 of ‘bool v8::Value::BooleanValue(v8::Isolate*) const’
npm ERR! npm ERR!  2904 |   bool BooleanValue(Isolate* isolate) const;
npm ERR! npm ERR!       |                     ~~~~~~~~~^~~~~~~
npm ERR! npm ERR! ../native/addon.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE eccPrivateSub(Nan::NAN_METHOD_ARGS_TYPE)’:
npm ERR! npm ERR! ../native/addon.cpp:240:29: warning: ignoring return value of ‘int secp256k1_ec_privkey_negate(const secp256k1_context*, unsigned char*)’, declared with attribute warn_unused_result [-Wunused-result]
npm ERR! npm ERR!   240 |  secp256k1_ec_privkey_negate(context, tweak_negated); // returns 1 always
npm ERR! npm ERR!       |  ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! npm ERR! make: *** [secp256k1.target.mk:153: Release/obj.target/secp256k1/native/addon.o] Error 1
npm ERR! npm ERR! gyp ERR! build error 
npm ERR! npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! npm ERR! gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:369:20)
npm ERR! npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! npm ERR! gyp ERR! System Linux 5.4.0-26-generic
npm ERR! npm ERR! gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! npm ERR! gyp ERR! cwd /home/pool/.npm/_cacache/tmp/git-clone-409085e3/node_modules/tiny-secp256k1
npm ERR! npm ERR! gyp ERR! node -v v15.14.0
npm ERR! npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! npm ERR! gyp ERR! not ok
Cideg commented 3 years ago

which system do you use? unbuntu?? node - v15.14.0

use v11 apt-get remove --purge nodejs npm curl -sL https://deb.nodesource.com/setup_11.x | sudo -E bash sudo apt-get install -y nodejs npm update