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

Installation Errors (NodeJS 0.15.x, NPM 7.0.x) #17

Open
TheVinhLuong102 opened this issue Nov 15, 2020 · 1 comment
Open

Installation Errors (NodeJS 0.15.x, NPM 7.0.x) #17

TheVinhLuong102 opened this issue Nov 15, 2020 · 1 comment

Comments

@TheVinhLuong102
Copy link

Hi @jeancarl, I'm encountering the below errors while installing -- could you help me take a look into the problems?

My NodeJS version is 0.15.x, NPM version is 7.0.x -- compatible with the latest TJBot 2.0.0.

npm install ~/.node-red/nodes/node-red-contrib-tjbot

npm WARN deprecated @types/[email protected]: This is a stub types definition. form-data provides its own type definitions, so you do not need this installed.
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: request has been deprecated, see request/request#3142
npm WARN deprecated [email protected]: DeprecationWarning: watson-developer-cloud moved to ibm-watson. To get updates, use the new package.
npm ERR! code 1
npm ERR! path /home/pi/.node-red/nodes/node-red-contrib-tjbot/node_modules/sleep
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
npm ERR! make: Entering directory '/home/pi/.node-red/nodes/node-red-contrib-tjbot/node_modules/sleep/build'
npm ERR! CXX(target) Release/obj.target/node_sleep/sleep.o
npm ERR! make: Leaving directory '/home/pi/.node-red/nodes/node-red-contrib-tjbot/node_modules/sleep/build'
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | linux | arm
npm ERR! gyp info find Python using Python version 3.7.3 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 '/usr/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/pi/.node-red/nodes/node-red-contrib-tjbot/node_modules/sleep/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/usr/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/home/pi/.cache/node-gyp/15.2.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=/home/pi/.cache/node-gyp/15.2.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/usr/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/home/pi/.cache/node-gyp/15.2.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/home/pi/.node-red/nodes/node-red-contrib-tjbot/node_modules/sleep',
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! ../sleep.cc:6:11: error: ‘v8::Handle’ has not been declared
npm ERR! using v8::Handle;
npm ERR! ^~~~~~
npm ERR! ../sleep.cc: In function ‘void init(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’:
npm ERR! ../sleep.cc:103:53: error: no matching function for call to ‘v8::FunctionTemplate::GetFunction()’
npm ERR! Nan::New(MSleep)->GetFunction());
npm ERR! ^
npm ERR! In file included from /home/pi/.cache/node-gyp/15.2.0/include/node/node.h:63,
npm ERR! from ../../nan/nan.h:56,
npm ERR! from ../sleep.cc:2:
npm ERR! /home/pi/.cache/node-gyp/15.2.0/include/node/v8.h:6497:46: note: candidate: ‘v8::MaybeLocalv8::Function v8::FunctionTemplate::GetFunction(v8::Localv8::Context)’
npm ERR! V8_WARN_UNUSED_RESULT MaybeLocal GetFunction(
npm ERR! ^~~~~~~~~~~
npm ERR! /home/pi/.cache/node-gyp/15.2.0/include/node/v8.h:6497:46: note: candidate expects 1 argument, 0 provided
npm ERR! ../sleep.cc:105:54: error: no matching function for call to ‘v8::FunctionTemplate::GetFunction()’
npm ERR! Nan::New(MUSleep)->GetFunction());
npm ERR! ^
npm ERR! In file included from /home/pi/.cache/node-gyp/15.2.0/include/node/node.h:63,
npm ERR! from ../../nan/nan.h:56,
npm ERR! from ../sleep.cc:2:
npm ERR! /home/pi/.cache/node-gyp/15.2.0/include/node/v8.h:6497:46: note: candidate: ‘v8::MaybeLocalv8::Function v8::FunctionTemplate::GetFunction(v8::Localv8::Context)’
npm ERR! V8_WARN_UNUSED_RESULT MaybeLocal GetFunction(
npm ERR! ^~~~~~~~~~~
npm ERR! /home/pi/.cache/node-gyp/15.2.0/include/node/v8.h:6497:46: note: candidate expects 1 argument, 0 provided
npm ERR! In file included from ../../nan/nan.h:56,
npm ERR! from ../sleep.cc:2:
npm ERR! ../sleep.cc: At global scope:
npm ERR! /home/pi/.cache/node-gyp/15.2.0/include/node/node.h:835:43: warning: cast between incompatible function types from ‘void ()(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’ {aka ‘void ()(v8::Localv8::Object)’} to ‘node::addon_register_func’ {aka ‘void ()(v8::Localv8::Object, v8::Localv8::Value, void)’} [-Wcast-function-type]
npm ERR! (node::addon_register_func) (regfunc),
npm ERR! ^
npm ERR! /home/pi/.cache/node-gyp/15.2.0/include/node/node.h:869:3: note: in expansion of macro ‘NODE_MODULE_X’
npm ERR! NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage)
npm ERR! ^~~~~~~~~~~~~
npm ERR! ../sleep.cc:109:1: note: in expansion of macro ‘NODE_MODULE’
npm ERR! NODE_MODULE(node_sleep, init)
npm ERR! ^~~~~~~~~~~
npm ERR! make: *** [node_sleep.target.mk:109: Release/obj.target/node_sleep/sleep.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 (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:329:20)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:277:12)
npm ERR! gyp ERR! System Linux 5.4.72-v7l+
npm ERR! gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /home/pi/.node-red/nodes/node-red-contrib-tjbot/node_modules/sleep
npm ERR! gyp ERR! node -v v15.2.0
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2020-11-15T06_47_54_362Z-debug.log

@chunyianliew
Copy link

The TJBot library has recently been upgraded: https://github.com/ibmtjbot/tjbotlib/releases
You can try to use the latest version by changing the version number of tjbot under dependencies in the package.json from 1.5.1 to 2.0.1
I suspect that this will resolve your compile issues.

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