'Npm install "error: no matching function for call to ‘v8::Value::Int32Value()’"
Transitioning over to Buster from Stretch and trying to rebuild our node application. Running Raspberry Pi CM3L
OS Buster 5.10.103-v7+ (was Stretch 4.9.59-v7+) node-gyp 9.0.0 (was 3.6.2) node 16.15.0 (was 8.9.4) npm 8.5.5 (was 6.0.0) Python 3.7.3 (was Python 2) I upgraded NaN to the latest package that support Node 16.6.1
Terminal output after running npm install.
> [email protected] install
> node-gyp rebuild
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | arm
gyp info find Python using Python version 3.7.3 found at "/usr/bin/python3"
gyp info spawn /usr/bin/python3
gyp info spawn args [
gyp info spawn args '/home/pi/.config/nvm/versions/node/v16.15.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/pi/devel/S/SystemServices/ControllerJs/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/pi/.config/nvm/versions/node/v16.15.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/pi/.cache/node-gyp/16.15.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/pi/.cache/node-gyp/16.15.0',
gyp info spawn args '-Dnode_gyp_dir=/home/pi/.config/nvm/versions/node/v16.15.0/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/home/pi/.cache/node-gyp/16.15.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/home/pi/devel/S/SystemServices/ControllerJs',
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 info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/home/pi/devel/S/SystemServices/ControllerJs/build'
CXX(target) Release/obj.target/comm/comm.o
<command-line>: warning: "V8_DEPRECATION_WARNINGS" redefined
<command-line>: note: this is the location of the previous definition
In file included from ../comm.cc:7:
../Messages.h:322:1: warning: ‘typedef’ was ignored in this declaration
typedef enum {
^~~~~~~
../comm.cc: In member function ‘virtual void GpioInterruptWorker::HandleOKCallback()’:
../comm.cc:112:29: warning: ‘v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const’ is deprecated [-Wdeprecated-declarations]
callback->Call(argc, argv);
^
In file included from ../comm.cc:4:
../../../node_modules/nan/nan.h:1744:3: note: declared here
Call(int argc, v8::Local<v8::Value> argv[]) const {
^~~~
../comm.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE InitializeHardware(Nan::NAN_METHOD_ARGS_TYPE)’:
../comm.cc:123:48: error: no matching function for call to ‘v8::Value::Int32Value()’
unsigned int bootMode = info[0]->Int32Value();
^
In file included from /home/pi/.cache/node-gyp/16.15.0/include/node/node.h:63,
from ../comm.cc:3:
/home/pi/.cache/node-gyp/16.15.0/include/node/v8.h:3107:40: note: candidate: ‘v8::Maybe<int> v8::Value::Int32Value(v8::Local<v8::Context>) const’
V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
^~~~~~~~~~
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
