Hello i am trying to install a development environment for gladys.
but i’ve getting this error when i try to install usb service dependancies.
anyone know how to resolve this issue.
WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm ERR! code 1
npm ERR! path /home/anand/Desktop/Gladys/server/services/usb/node_modules/@serialport/bindings
npm ERR! command failed
npm ERR! command sh -c prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild
npm ERR! make: Entering directory '/home/anand/Desktop/Gladys/server/services/usb/node_modules/@serialport/bindings/build'
npm ERR! CXX(target) Release/obj.target/bindings/src/serialport.o
npm ERR! make: Leaving directory '/home/anand/Desktop/Gladys/server/services/usb/node_modules/@serialport/bindings/build'
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@8.4.1
npm ERR! gyp info using node@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 '/home/anand/Desktop/Gladys/server/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/anand/Desktop/Gladys/server/services/usb/node_modules/@serialport/bindings/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/home/anand/Desktop/Gladys/server/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/home/anand/.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=/home/anand/.cache/node-gyp/20.9.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/home/anand/Desktop/Gladys/server/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/home/anand/.cache/node-gyp/20.9.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/home/anand/Desktop/Gladys/server/services/usb/node_modules/@serialport/bindings',
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/./serialport.h:6,
npm ERR! from ../src/serialport.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/./serialport.h:6,
npm ERR! from ../src/serialport.cpp:1:
npm ERR! ../../../nan/nan.h: In function ‘bool Nan::IdleNotification(int)’:
npm ERR! ../../../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 /home/anand/.cache/node-gyp/20.9.0/include/node/v8-initialization.h:13,
npm ERR! from /home/anand/.cache/node-gyp/20.9.0/include/node/v8.h:34,
npm ERR! from /home/anand/.cache/node-gyp/20.9.0/include/node/node.h:73,
npm ERR! from ../../../nan/nan.h:56,
npm ERR! from ../src/./serialport.h:6,
npm ERR! from ../src/serialport.cpp:1:
npm ERR! /home/anand/.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/./serialport.h:6,
npm ERR! from ../src/serialport.cpp:1:
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:2542: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! 2542 | tpl->SetAccessor(
npm ERR! | ~~~~~~~~~~~~~~~~^
npm ERR! 2543 | name
npm ERR! | ~~~~
npm ERR! 2544 | , getter_
npm ERR! | ~~~~~~~~~
npm ERR! 2545 | , setter_
npm ERR! | ~~~~~~~~~
npm ERR! 2546 | , obj
npm ERR! | ~~~~~
npm ERR! 2547 | , settings
npm ERR! | ~~~~~~~~~~
npm ERR! 2548 | , attribute
npm ERR! | ~~~~~~~~~~~
npm ERR! 2549 | , signature);
npm ERR! | ~~~~~~~~~~~~
npm ERR! In file included from /home/anand/.cache/node-gyp/20.9.0/include/node/v8-function.h:15,
npm ERR! from /home/anand/.cache/node-gyp/20.9.0/include/node/v8.h:33,
npm ERR! from /home/anand/.cache/node-gyp/20.9.0/include/node/node.h:73,
npm ERR! from ../../../nan/nan.h:56,
npm ERR! from ../src/./serialport.h:6,
npm ERR! from ../src/serialport.cpp:1:
npm ERR! /home/anand/.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! /home/anand/.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! /home/anand/.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! /home/anand/.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! ../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Open(Nan::NAN_METHOD_ARGS_TYPE)’:
npm ERR! ../src/serialport.cpp:78:51: 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! 78 | uv_queue_work(uv_default_loop(), req, EIO_Open, (uv_after_work_cb)EIO_AfterOpen);
npm ERR! | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! ../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Update(Nan::NAN_METHOD_ARGS_TYPE)’:
npm ERR! ../src/serialport.cpp:135:53: 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! 135 | uv_queue_work(uv_default_loop(), req, EIO_Update, (uv_after_work_cb)EIO_AfterUpdate);
npm ERR! | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! ../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Close(Nan::NAN_METHOD_ARGS_TYPE)’:
npm ERR! ../src/serialport.cpp:175:52: 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! 175 | uv_queue_work(uv_default_loop(), req, EIO_Close, (uv_after_work_cb)EIO_AfterClose);
npm ERR! | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! ../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Flush(Nan::NAN_METHOD_ARGS_TYPE)’:
npm ERR! ../src/serialport.cpp:215:52: 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! 215 | uv_queue_work(uv_default_loop(), req, EIO_Flush, (uv_after_work_cb)EIO_AfterFlush);
npm ERR! | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! ../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Set(Nan::NAN_METHOD_ARGS_TYPE)’:
npm ERR! ../src/serialport.cpp:270:50: 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! 270 | uv_queue_work(uv_default_loop(), req, EIO_Set, (uv_after_work_cb)EIO_AfterSet);
npm ERR! | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! ../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Get(Nan::NAN_METHOD_ARGS_TYPE)’:
npm ERR! ../src/serialport.cpp:314:50: 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! 314 | uv_queue_work(uv_default_loop(), req, EIO_Get, (uv_after_work_cb)EIO_AfterGet);
npm ERR! | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! ../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE GetBaudRate(Nan::NAN_METHOD_ARGS_TYPE)’:
npm ERR! ../src/serialport.cpp:363:58: 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! 363 | uv_queue_work(uv_default_loop(), req, EIO_GetBaudRate, (uv_after_work_cb)EIO_AfterGetBaudRate);
npm ERR! | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! ../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Drain(Nan::NAN_METHOD_ARGS_TYPE)’:
npm ERR! ../src/serialport.cpp:409:52: 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! 409 | uv_queue_work(uv_default_loop(), req, EIO_Drain, (uv_after_work_cb)EIO_AfterDrain);
npm ERR! | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! ../src/serialport.cpp: At global scope:
npm ERR! ../src/serialport.cpp:430:28: warning: unnecessary parentheses in declaration of ‘ToParityEnum’ [-Wparentheses]
npm ERR! 430 | SerialPortParity NAN_INLINE(ToParityEnum(const v8::Local<v8::String>& v8str)) {
npm ERR! | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! ../src/serialport.cpp:430:28: note: remove parentheses
npm ERR! 430 | SerialPortParity NAN_INLINE(ToParityEnum(const v8::Local<v8::String>& v8str)) {
npm ERR! | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! | - -
npm ERR! ../src/serialport.cpp:449:30: warning: unnecessary parentheses in declaration of ‘ToStopBitEnum’ [-Wparentheses]
npm ERR! 449 | SerialPortStopBits NAN_INLINE(ToStopBitEnum(double stopBits)) {
npm ERR! | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! ../src/serialport.cpp:449:30: note: remove parentheses
npm ERR! 449 | SerialPortStopBits NAN_INLINE(ToStopBitEnum(double stopBits)) {
npm ERR! | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! | - -
npm ERR! In file included from ../../../nan/nan.h:56,
npm ERR! from ../src/./serialport.h:6,
npm ERR! from ../src/serialport.cpp:1:
npm ERR! /home/anand/.cache/node-gyp/20.9.0/include/node/node.h:1170:7: 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! 1170 | (node::addon_register_func) (regfunc), \
npm ERR! | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! /home/anand/.cache/node-gyp/20.9.0/include/node/node.h:1204:3: note: in expansion of macro ‘NODE_MODULE_X’
npm ERR! 1204 | NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage)
npm ERR! | ^~~~~~~~~~~~~
npm ERR! ../src/serialport.cpp:483:1: note: in expansion of macro ‘NODE_MODULE’
npm ERR! 483 | NODE_MODULE(serialport, init);
npm ERR! | ^~~~~~~~~~~
npm ERR! make: *** [bindings.target.mk:116: Release/obj.target/bindings/src/serialport.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 (/home/anand/Desktop/Gladys/server/node_modules/node-gyp/lib/build.js:194: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 6.5.0-28-generic
npm ERR! gyp ERR! command "/home/anand/.nvm/versions/node/v20.9.0/bin/node" "/home/anand/Desktop/Gladys/server/node_modules/.bin/node-gyp" "rebuild"
npm ERR! gyp ERR! cwd /home/anand/Desktop/Gladys/server/services/usb/node_modules/@serialport/bindings
npm ERR! gyp ERR! node -v v20.9.0
npm ERR! gyp ERR! node-gyp -v v8.4.1
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in: /home/anand/.npm/_logs/2024-05-08T13_30_08_795Z-debug-0.log