NPM Install is not working(with direct Aerospike dependency) with Node 18.15.0 and NPM 9.5.0 In Graviton machine (Arm64)

53 views Asked by At

I am trying to do npm install in Graviton machine with Arm64 architecture . But getting this below wierd error , Can anyone please help here tried many ways but it's not working . Our service is using aerospike as a direct dependency and I have updated aerospike to 5.9.0 which is supporting for Arm64 architecture.

Error :

nnpm ERR! code 1\nnpm ERR! path /tmp/<service_name>/node_modules/sleep\nnpm ERR! command failed\nnpm ERR! command sh -c node-gyp rebuild\nnpm ERR! make: Entering directory '/tmp/<service_name>/node_modules/sleep/build'\nnpm ERR! CXX(target) Release/obj.target/node_sleep/sleep.o\nnpm ERR! make: Leaving directory '/tmp/<service_name>/node_modules/sleep/build'\nnpm ERR! gyp info it worked if it ends with ok\nnpm ERR! gyp info using [email protected]\nnpm ERR! gyp info using [email protected] | linux | arm64\nnpm ERR! gyp info find Python using Python version 3.8.10 found at "/usr/bin/python3"\nnpm ERR! gyp info spawn /usr/bin/python3\nnpm ERR! gyp info spawn args [\nnpm ERR! gyp info spawn args '/tmp/market-tracker_1704347946/node_modules/node-gyp/gyp/gyp_main.py',\nnpm ERR! gyp info spawn args 'binding.gyp',\nnpm ERR! gyp info spawn args '-f',\nnpm ERR! gyp info spawn args 'make',\nnpm ERR! gyp info spawn args '-I',\nnpm ERR! gyp info spawn args '/tmp/<service_name>/node_modules/sleep/build/config.gypi',\nnpm ERR! gyp info spawn args '-I',\nnpm ERR! gyp info spawn args '/tmp/<service_name>/node_modules/node-gyp/addon.gypi',\nnpm ERR! gyp info spawn args '-I',\nnpm ERR! gyp info spawn args '/home/ubuntu/.cache/node-gyp/18.15.0/include/node/common.gypi',\nnpm ERR! gyp info spawn args '-Dlibrary=shared_library',\nnpm ERR! gyp info spawn args '-Dvisibility=default',\nnpm ERR! gyp info spawn args '-Dnode_root_dir=/home/ubuntu/.cache/node-gyp/18.15.0',\nnpm ERR! gyp info spawn args '-Dnode_gyp_dir=/tmp/<service_name>/node_modules/node-gyp',\nnpm ERR! gyp info spawn args '-Dnode_lib_file=/home/ubuntu/.cache/node-gyp/18.15.0/<(target_arch)/node.lib',\nnpm ERR! gyp info spawn args '-Dmodule_root_dir=/tmp/<service_name>/node_modules/sleep',\nnpm ERR! gyp info spawn args '-Dnode_engine=v8',\nnpm ERR! gyp info spawn args '--depth=.',\nnpm ERR! gyp info spawn args '--no-parallel',\nnpm ERR! gyp info spawn args '--generator-output',\nnpm ERR! gyp info spawn args 'build',\nnpm ERR! gyp info spawn args '-Goutput_dir=.'\nnpm ERR! gyp info spawn args ]\nnpm ERR! gyp info spawn make\nnpm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]\nnpm ERR! ../sleep.cc:6:11: error: ‘v8::Handle’ has not been declared\nnpm ERR! 6 | using v8::Handle;\nnpm ERR! | ^~~~~~\nnpm ERR! ../sleep.cc: In function ‘void init(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’:\nnpm ERR! ../sleep.cc:103:53: error: no matching function for call to ‘v8::FunctionTemplate::GetFunction()’\nnpm ERR! 103 | Nan::New(MSleep)->GetFunction());\nnpm ERR! | ^\nnpm ERR! In file included from /home/ubuntu/.cache/node-gyp/18.15.0/include/node/v8-function.h:15,\nnpm ERR! from /home/ubuntu/.cache/node-gyp/18.15.0/include/node/v8.h:33,\nnpm ERR! from /home/ubuntu/.cache/node-gyp/18.15.0/include/node/node.h:73,\nnpm ERR! from ../../nan/nan.h:62,\nnpm ERR! from ../sleep.cc:2:\nnpm ERR! /home/ubuntu/.cache/node-gyp/18.15.0/include/node/v8-template.h:513:46: note: candidate: ‘v8::MaybeLocal<v8::Function> v8::FunctionTemplate::GetFunction(v8::Local<v8::Context>)’\nnpm ERR! 513 | V8_WARN_UNUSED_RESULT MaybeLocal GetFunction(\nnpm ERR! | ^~~~~~~~~~~\nnpm ERR! /home/ubuntu/.cache/node-gyp/18.15.0/include/node/v8-template.h:513:46: note: candidate expects 1 argument, 0 provided\nnpm ERR! ../sleep.cc:105:54: error: no matching function for call to ‘v8::FunctionTemplate::GetFunction()’\nnpm ERR! 105 | Nan::New(MUSleep)->GetFunction());\nnpm ERR! | ^\nnpm ERR! In file included from /home/ubuntu/.cache/node-gyp/18.15.0/include/node/v8-function.h:15,\nnpm ERR! from /home/ubuntu/.cache/node-gyp/18.15.0/include/node/v8.h:33,\nnpm ERR! from /home/ubuntu/.cache/node-gyp/18.15.0/include/node/node.h:73,\nnpm ERR! from ../../nan/nan.h:62,\nnpm ERR! from ../sleep.cc:2:\nnpm ERR! /home/ubuntu/.cache/node-gyp/18.15.0/include/node/v8-template.h:513:46: note: candidate: ‘v8::MaybeLocal<v8::Function> v8::FunctionTemplate::GetFunction(v8::Local<v8::Context>)’\nnpm ERR! 513 | V8_WARN_UNUSED_RESULT MaybeLocal GetFunction(\nnpm ERR! | ^~~~~~~~~~~\nnpm ERR! /home/ubuntu/.cache/node-gyp/18.15.0/include/node/v8-template.h:513:46: note: candidate expects 1 argument, 0 provided\nnpm ERR! In file included from ../../nan/nan.h:62,\nnpm ERR! from ../sleep.cc:2:\nnpm ERR! ../sleep.cc: At global scope:\nnpm ERR! /home/ubuntu/.cache/node-gyp/18.15.0/include/node/node.h:978: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]\nnpm ERR! 978 | (node::addon_register_func) (regfunc), \\nnpm ERR! | ^\nnpm ERR! /home/ubuntu/.cache/node-gyp/18.15.0/include/node/node.h:1012:3: note: in expansion of macro ‘NODE_MODULE_X’\nnpm ERR! 1012 | NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage)\nnpm ERR! | ^~~~~~~~~~~~~\nnpm ERR! ../sleep.cc:109:1: note: in expansion of macro ‘NODE_MODULE’\nnpm ERR! 109 | NODE_MODULE(node_sleep, init)\nnpm ERR! | ^~~~~~~~~~~\nnpm ERR! make: *** [node_sleep.target.mk:111: Release/obj.target/node_sleep/sleep.o] Error 1\nnpm ERR! gyp ERR! build error \nnpm ERR! gyp ERR! stack Error: make failed with exit code: 2\nnpm ERR! gyp ERR! stack at ChildProcess. (/tmp/<service_name>/node_modules/node-gyp/lib/build.js:209:23)\nnpm ERR! gyp ERR! System Linux 5.15.0-1045-aws\nnpm ERR! gyp ERR! command "/home/ubuntu/.nvm/versions/node/v18.15.0/bin/node" "/tmp/<service_name>/node_modules/.bin/node-gyp" "rebuild"\nnpm ERR! gyp ERR! cwd /tmp/<service_name>/node_modules/sleep\nnpm ERR! gyp ERR! node -v v18.15.0\nnpm ERR! gyp ERR! node-gyp -v v10.0.1\nnpm ERR! gyp ERR! not ok\n\nnpm ERR! A complete log of this run can be found in:\nnpm ERR! /home/ubuntu/.npm/_logs/2024-01-04T05_59_22_585Z-debug-0.log", "stderr_lines": ["npm WARN EBADENGINE Unsupported engine {", "npm WARN EBADENGINE package: '[email protected]',", "npm WARN EBADENGINE required: { node: '>=4.0.0 <11.0.0', npm: '>=2.0.0' },", "npm WARN EBADENGINE current: { node: 'v18.15.0', npm: '9.5.0' }", "npm WARN EBADENGINE }"

0

There are 0 answers