Not able to install node java in redhat machine

61 views
Skip to first unread message

Vijay Delvadiya

unread,
Mar 23, 2023, 3:51:37 AM3/23/23
to node-java
Not able to install node-java in Redhat machine giving errors like

Os information 

NAME="Red Hat Enterprise Linux"
VERSION="9.0 (Plow)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="9.0"
PLATFORM_ID="platform:el9"
PRETTY_NAME="Red Hat Enterprise Linux 9.0 (Plow)"
ANSI_COLOR="0;31"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:redhat:enterprise_linux:9::baseos"
HOME_URL="https://www.redhat.com/"
DOCUMENTATION_URL="https://access.redhat.com/documentation/red_hat_enterprise_linux/9/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 9"
REDHAT_BUGZILLA_PRODUCT_VERSION=9.0
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="9.0"




Error 

npm ERR! code 1
npm ERR! path /home/xxx/node_modules/java
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
npm ERR! make: Entering directory '/home/xxx/node_modules/java/build'
npm ERR!   CXX(target) Release/obj.target/nodejavabridge_bindings/src/java.o
npm ERR! make: Leaving directory '/home/xxx/node_modules/java/build'
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node...@9.3.1
npm ERR! gyp info using no...@19.8.1 | linux | x64
npm ERR! gyp info find Python using Python version 3.9.10 found at "/bin/python3"
npm ERR! gyp info spawn /bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/root/.nvm/versions/node/v19.8.1/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/home/xxx/node_modules/java/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/root/.nvm/versions/node/v19.8.1/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/root/.cache/node-gyp/19.8.1/include/node/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/root/.cache/node-gyp/19.8.1',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/root/.nvm/versions/node/v19.8.1/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/root/.cache/node-gyp/19.8.1/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/home/xxx/node_modules/java',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! In file included from ../../nan/nan.h:176,
npm ERR!                  from ../src/java.h:9,
npm ERR!                  from ../src/java.cpp:1:
npm ERR! ../../nan/nan_callbacks.h:55:23: error: ‘AccessorSignature’ is not a member of ‘v8’
npm ERR!    55 | typedef v8::Local<v8::AccessorSignature> Sig;
npm ERR!       |                       ^~~~~~~~~~~~~~~~~
npm ERR! ../../nan/nan_callbacks.h:55:40: error: template argument 1 is invalid
npm ERR!    55 | typedef v8::Local<v8::AccessorSignature> Sig;
npm ERR!       |                                        ^
npm ERR! In file included from ../src/java.h:9,
npm ERR!                  from ../src/java.cpp:1:
npm ERR! ../../nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’:
npm ERR! ../../nan/nan.h:2294:7: 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!  2294 |     , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
npm ERR!       |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! ../../nan/nan.h: In function ‘void Nan::SetAccessor(v8::Local<v8::ObjectTemplate>, v8::Local<v8::String>, Nan::GetterCallback, Nan::SetterCallback, v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute, Nan::imp::Sig)’:
npm ERR! ../../nan/nan.h:2535:19: error: no matching function for call to ‘v8::ObjectTemplate::SetAccessor(v8::Local<v8::String>&, void (*&)(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>&), void (*&)(v8::Local<v8::Name>, v8::Local<v8::Value>, const v8::PropertyCallbackInfo<void>&), v8::Local<v8::Object>&, v8::AccessControl&, v8::PropertyAttribute&, Nan::imp::Sig&)’
npm ERR!  2535 |   tpl->SetAccessor(
npm ERR!       |   ~~~~~~~~~~~~~~~~^
npm ERR!  2536 |       name
npm ERR!       |       ~~~~
npm ERR!  2537 |     , getter_
npm ERR!       |     ~~~~~~~~~
npm ERR!  2538 |     , setter_
npm ERR!       |     ~~~~~~~~~
npm ERR!  2539 |     , obj
npm ERR!       |     ~~~~~
npm ERR!  2540 |     , settings
npm ERR!       |     ~~~~~~~~~~
npm ERR!  2541 |     , attribute
npm ERR!       |     ~~~~~~~~~~~
npm ERR!  2542 |     , signature);
npm ERR!       |     ~~~~~~~~~~~~
npm ERR! In file included from /root/.cache/node-gyp/19.8.1/include/node/v8-function.h:15,
npm ERR!                  from /root/.cache/node-gyp/19.8.1/include/node/v8.h:33,
npm ERR!                  from ../src/java.h:5,
npm ERR!                  from ../src/java.cpp:1:
npm ERR! /root/.cache/node-gyp/19.8.1/include/node/v8-template.h:807:8: note: candidate: ‘void v8::ObjectTemplate::SetAccessor(v8::Local<v8::String>, v8::AccessorGetterCallback, v8::AccessorSetterCallback, v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute, v8::SideEffectType, v8::SideEffectType)’
npm ERR!   807 |   void SetAccessor(
npm ERR!       |        ^~~~~~~~~~~
npm ERR! /root/.cache/node-gyp/19.8.1/include/node/v8-template.h:812:22: note:   no known conversion for argument 7 from ‘Nan::imp::Sig’ {aka ‘int’} to ‘v8::SideEffectType’
npm ERR!   812 |       SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect,
npm ERR!       |       ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! /root/.cache/node-gyp/19.8.1/include/node/v8-template.h:814:8: note: candidate: ‘void v8::ObjectTemplate::SetAccessor(v8::Local<v8::Name>, v8::AccessorNameGetterCallback, v8::AccessorNameSetterCallback, v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute, v8::SideEffectType, v8::SideEffectType)’
npm ERR!   814 |   void SetAccessor(
npm ERR!       |        ^~~~~~~~~~~
npm ERR! /root/.cache/node-gyp/19.8.1/include/node/v8-template.h:819:22: note:   no known conversion for argument 7 from ‘Nan::imp::Sig’ {aka ‘int’} to ‘v8::SideEffectType’
npm ERR!   819 |       SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect,
npm ERR!       |       ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! make: *** [nodejavabridge_bindings.target.mk:124: Release/obj.target/nodejavabridge_bindings/src/java.o] Error 1
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack     at ChildProcess.onExit (/root/.nvm/versions/node/v19.8.1/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:203:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:512:28)
npm ERR! gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:293:12)
npm ERR! gyp ERR! System Linux 5.14.0-70.22.1.el9_0.x86_64
npm ERR! gyp ERR! command "/root/.nvm/versions/node/v19.8.1/bin/node" "/root/.nvm/versions/node/v19.8.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /home/xxx/node_modules/java
npm ERR! gyp ERR! node -v v19.8.1
npm ERR! gyp ERR! node-gyp -v v9.3.1
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2023-03-23T06_54_23_657Z-debug-0.log

Li Jie

unread,
Nov 3, 2023, 6:20:19 AM11/3/23
to node-java
Are there any good solutions without reducing the node version?

OS:ubuntu22.04   

node 20.9.0
python 3.10
node-gyp 9.4.0

same Error
npm ERR! code 1
npm ERR! path /xxx/node_modules/java

npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
npm ERR! make: Entering directory '/xxx/node_modules/java/build'
npm ERR!   CXX(target) Release/obj.target/nodejavabridge_bindings/src/java.o
npm ERR! make: Leaving directory '/xxx/node_modules/java/build'

npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node...@9.4.0
npm ERR! gyp info using no...@20.9.0 | linux | x64
npm ERR! gyp info find Python using Python version 3.10.12 found at "/usr/bin/python3"
npm ERR! gyp info spawn /usr/bin/python3

npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/xxx/node_modules/node-gyp/gyp/gyp_main.py',

npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/xxx/node_modules/java/build/config.gypi',

npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/xxx/node_modules/node-gyp/addon.gypi',

npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/root/.cache/node-gyp/20.9.0/include/node/common.gypi',

npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/root/.cache/node-gyp/20.9.0',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/xxx/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/root/.cache/node-gyp/20.9.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/xxx/node_modules/java',

npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! In file included from ../node_modules/nan/nan.h:176,

npm ERR!                  from ../src/java.h:9,
npm ERR!                  from ../src/java.cpp:1:
npm ERR! ../node_modules/nan/nan_callbacks.h:55:23: error: ‘AccessorSignature’ is not a member of ‘v8’

npm ERR!    55 | typedef v8::Local<v8::AccessorSignature> Sig;
npm ERR!       |                       ^~~~~~~~~~~~~~~~~
npm ERR! ../node_modules/nan/nan_callbacks.h:55:40: error: template argument 1 is invalid

npm ERR!    55 | typedef v8::Local<v8::AccessorSignature> Sig;
npm ERR!       |                                        ^
npm ERR! In file included from ../src/java.h:9,
npm ERR!                  from ../src/java.cpp:1:
npm ERR! ../node_modules/nan/nan.h: In function ‘bool Nan::IdleNotification(int)’:
npm ERR! ../node_modules/nan/nan.h:682:63: warning: ‘bool v8::Isolate::IdleNotificationDeadline(double)’ is deprecated: Use MemoryPressureNotification() to influence the GC schedule. [-Wdeprecated-declarations]
npm ERR!   682 |     return v8::Isolate::GetCurrent()->IdleNotificationDeadline(
npm ERR!       |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
npm ERR!   683 |         idle_time_in_ms * 0.001);
npm ERR!       |         ~~~~~~~~~~~~~~~~~~~~~~~~                              
npm ERR! In file included from /root/.cache/node-gyp/20.9.0/include/node/v8-initialization.h:13,
npm ERR!                  from /root/.cache/node-gyp/20.9.0/include/node/v8.h:34,

npm ERR!                  from ../src/java.h:5,
npm ERR!                  from ../src/java.cpp:1:
npm ERR! /root/.cache/node-gyp/20.9.0/include/node/v8-isolate.h:1293:8: note: declared here
npm ERR!  1293 |   bool IdleNotificationDeadline(double deadline_in_seconds);
npm ERR!       |        ^~~~~~~~~~~~~~~~~~~~~~~~

npm ERR! In file included from ../src/java.h:9,
npm ERR!                  from ../src/java.cpp:1:
npm ERR! ../node_modules/nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’:
npm ERR! ../node_modules/nan/nan.h:2294:7: 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!  2294 |     , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
npm ERR!       |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! ../node_modules/nan/nan.h: In function ‘void Nan::SetAccessor(v8::Local<v8::ObjectTemplate>, v8::Local<v8::String>, Nan::GetterCallback, Nan::SetterCallback, v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute, Nan::imp::Sig)’:
npm ERR! ../node_modules/nan/nan.h:2535:19: error: no matching function for call to ‘v8::ObjectTemplate::SetAccessor(v8::Local<v8::String>&, void (*&)(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>&), void (*&)(v8::Local<v8::Name>, v8::Local<v8::Value>, const v8::PropertyCallbackInfo<void>&), v8::Local<v8::Object>&, v8::AccessControl&, v8::PropertyAttribute&, Nan::imp::Sig&)’

npm ERR!  2535 |   tpl->SetAccessor(
npm ERR!       |   ~~~~~~~~~~~~~~~~^
npm ERR!  2536 |       name
npm ERR!       |       ~~~~        
npm ERR!  2537 |     , getter_
npm ERR!       |     ~~~~~~~~~      
npm ERR!  2538 |     , setter_
npm ERR!       |     ~~~~~~~~~      
npm ERR!  2539 |     , obj
npm ERR!       |     ~~~~~          
npm ERR!  2540 |     , settings
npm ERR!       |     ~~~~~~~~~~    
npm ERR!  2541 |     , attribute
npm ERR!       |     ~~~~~~~~~~~    
npm ERR!  2542 |     , signature);
npm ERR!       |     ~~~~~~~~~~~~  
npm ERR! In file included from /root/.cache/node-gyp/20.9.0/include/node/v8-function.h:15,
npm ERR!                  from /root/.cache/node-gyp/20.9.0/include/node/v8.h:33,

npm ERR!                  from ../src/java.h:5,
npm ERR!                  from ../src/java.cpp:1:
npm ERR! /root/.cache/node-gyp/20.9.0/include/node/v8-template.h:809:8: note: candidate: ‘void v8::ObjectTemplate::SetAccessor(v8::Local<v8::String>, v8::AccessorGetterCallback, v8::AccessorSetterCallback, v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute, v8::SideEffectType, v8::SideEffectType)’
npm ERR!   809 |   void SetAccessor(
npm ERR!       |        ^~~~~~~~~~~
npm ERR! /root/.cache/node-gyp/20.9.0/include/node/v8-template.h:814:22: note:   no known conversion for argument 7 from ‘Nan::imp::Sig’ {aka ‘int’} to ‘v8::SideEffectType’
npm ERR!   814 |       SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect,
npm ERR!       |       ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! /root/.cache/node-gyp/20.9.0/include/node/v8-template.h:816:8: note: candidate: ‘void v8::ObjectTemplate::SetAccessor(v8::Local<v8::Name>, v8::AccessorNameGetterCallback, v8::AccessorNameSetterCallback, v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute, v8::SideEffectType, v8::SideEffectType)’
npm ERR!   816 |   void SetAccessor(
npm ERR!       |        ^~~~~~~~~~~
npm ERR! /root/.cache/node-gyp/20.9.0/include/node/v8-template.h:821:22: note:   no known conversion for argument 7 from ‘Nan::imp::Sig’ {aka ‘int’} to ‘v8::SideEffectType’
npm ERR!   821 |       SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect,

npm ERR!       |       ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! make: *** [nodejavabridge_bindings.target.mk:124: Release/obj.target/nodejavabridge_bindings/src/java.o] Error 1
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack     at ChildProcess.onExit (/xxx/node_modules/node-gyp/lib/build.js:203:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:514:28)
npm ERR! gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:294:12)
npm ERR! gyp ERR! System Linux 5.15.0-78-generic
npm ERR! gyp ERR! command "/opt/node20/node-v20/bin/node" "/xxx/node_modules/.bin/node-gyp" "rebuild"
npm ERR! gyp ERR! cwd /xxx/node_modules/java
npm ERR! gyp ERR! node -v v20.9.0
npm ERR! gyp ERR! node-gyp -v v9.4.0

npm ERR! gyp ERR! not ok
Reply all
Reply to author
Forward
0 new messages