Open cidrblock opened 6 months ago
Hello from the future.
This is a cool project, thank you.
The binary is working fine but I wanted to try to build it myself and ran into issues.
Can you provide any pointers or suggestions? I'm happy to help here any way I can, although I'm more familiar with python.
I did try to update some of the deps in package.json but was only able to create a different set of errors. :)
LMK how I can help.
Here is a recreate Containerfile
FROM fedora:39 RUN dnf install -y \ python3 \ python3-pip \ python3-devel \ gcc-c++ \ git \ npm \ && dnf clean all RUN git clone https://github.com/brannondorsey/chattervox && \ cd chattervox && \ npm install && \ npm run build CMD /bin/bash
STEP 3/4: RUN git clone https://github.com/brannondorsey/chattervox && cd chattervox && npm install && npm run build Cloning into 'chattervox'... npm WARN old lockfile npm WARN old lockfile The package-lock.json file was created with an old version of npm, npm WARN old lockfile so supplemental metadata must be fetched from the registry. npm WARN old lockfile npm WARN old lockfile This is a one-time fix-up, please be patient... npm WARN old lockfile npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated npm WARN deprecated sntp@2.1.0: This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues. npm WARN deprecated is-data-descriptor@1.0.0: Please upgrade to v1.0.1 npm WARN deprecated mixin-deep@1.3.1: Critical bug fixed in v2.0.1, please upgrade to the latest version. npm WARN deprecated cryptiles@3.1.4: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial). npm WARN deprecated ini@1.3.5: Please update to ini >=1.3.6 to avoid a prototype pollution issue npm WARN deprecated is-accessor-descriptor@1.0.0: Please upgrade to v1.0.1 npm WARN deprecated set-value@0.4.3: Critical bug fixed in v3.0.1, please upgrade to the latest version. npm WARN deprecated is-data-descriptor@0.1.4: Please upgrade to v0.1.5 npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated npm WARN deprecated is-accessor-descriptor@0.1.6: Please upgrade to v0.1.7 npm WARN deprecated set-value@2.0.0: Critical bug fixed in v3.0.1, please upgrade to the latest version. npm WARN deprecated har-validator@5.0.3: this library is no longer supported npm WARN deprecated set-value@3.0.0: Critical bug fixed in v3.0.1, please upgrade to the latest version. npm WARN deprecated boom@4.3.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial). npm WARN deprecated is-data-descriptor@0.1.4: Please upgrade to v0.1.5 npm WARN deprecated is-data-descriptor@0.1.4: Please upgrade to v0.1.5 npm WARN deprecated is-data-descriptor@0.1.4: Please upgrade to v0.1.5 npm WARN deprecated is-accessor-descriptor@0.1.6: Please upgrade to v0.1.7 npm WARN deprecated is-accessor-descriptor@0.1.6: Please upgrade to v0.1.7 npm WARN deprecated is-accessor-descriptor@0.1.6: Please upgrade to v0.1.7 npm WARN deprecated is-accessor-descriptor@0.1.6: Please upgrade to v0.1.7 npm WARN deprecated boom@5.2.0: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial). npm WARN deprecated source-map-url@0.4.0: See https://github.com/lydell/source-map-url#deprecated npm WARN deprecated hoek@4.2.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial). npm WARN deprecated mkdirp@0.5.1: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.) npm WARN deprecated uuid@3.3.2: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm WARN deprecated source-map-resolve@0.5.2: See https://github.com/lydell/source-map-resolve#deprecated npm WARN deprecated hawk@6.0.2: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues. npm WARN deprecated request@2.85.0: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated istanbul@0.4.5: This module is no longer maintained, try this instead: npm WARN deprecated npm i nyc npm WARN deprecated Visit https://istanbul.js.org/integrations for other alternatives. npm WARN deprecated is-data-descriptor@0.1.4: Please upgrade to v0.1.5 npm WARN deprecated core-js@2.5.7: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js. npm notice npm notice New minor version of npm available! 10.2.3 -> 10.3.0 npm notice Changelog: <https://github.com/npm/cli/releases/tag/v10.3.0> npm notice Run `npm install -g npm@10.3.0` to update! npm notice npm ERR! code 1 npm ERR! path /chattervox/node_modules/serialport npm ERR! command failed npm ERR! command sh -c prebuild-install || node-gyp rebuild npm ERR! make: Entering directory '/chattervox/node_modules/serialport/build' npm ERR! CXX(target) Release/obj.target/serialport/src/serialport.o npm ERR! make: Leaving directory '/chattervox/node_modules/serialport/build' npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@10.0.1 npm ERR! gyp info using node@20.10.0 | linux | x64 npm ERR! gyp info find Python using Python version 3.12.0 found at "/usr/bin/python3" npm ERR! gyp http GET https://nodejs.org/download/release/v20.10.0/node-v20.10.0-headers.tar.gz npm ERR! gyp http 200 https://nodejs.org/download/release/v20.10.0/node-v20.10.0-headers.tar.gz npm ERR! gyp http GET https://nodejs.org/download/release/v20.10.0/SHASUMS256.txt npm ERR! gyp http 200 https://nodejs.org/download/release/v20.10.0/SHASUMS256.txt npm ERR! gyp info spawn /usr/bin/python3 npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args '/usr/lib/node_modules_20/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 '/chattervox/node_modules/serialport/build/config.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/usr/lib/node_modules_20/npm/node_modules/node-gyp/addon.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/root/.cache/node-gyp/20.10.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.10.0', npm ERR! gyp info spawn args '-Dnode_gyp_dir=/usr/lib/node_modules_20/npm/node_modules/node-gyp', npm ERR! gyp info spawn args '-Dnode_lib_file=/root/.cache/node-gyp/20.10.0/<(target_arch)/node.lib', npm ERR! gyp info spawn args '-Dmodule_root_dir=/chattervox/node_modules/serialport', 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:173, 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! ../../nan/nan.h: In function 'bool Nan::IdleNotification(int)': npm ERR! ../../nan/nan.h:615:63: warning: 'bool v8::Isolate::IdleNotificationDeadline(double)' is deprecated: Use MemoryPressureNotification() to influence the GC schedule. [-Wdeprecated-declarations] npm ERR! 615 | return v8::Isolate::GetCurrent()->IdleNotificationDeadline( npm ERR! | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ npm ERR! 616 | idle_time_in_ms * 0.001); npm ERR! | ~~~~~~~~~~~~~~~~~~~~~~~~ npm ERR! In file included from /root/.cache/node-gyp/20.10.0/include/node/v8-initialization.h:13, npm ERR! from /root/.cache/node-gyp/20.10.0/include/node/v8.h:34, npm ERR! from /root/.cache/node-gyp/20.10.0/include/node/node.h:73, npm ERR! from ../../nan/nan.h:53: npm ERR! /root/.cache/node-gyp/20.10.0/include/node/v8-isolate.h:1293:8: note: declared here npm ERR! 1293 | bool IdleNotificationDeadline(double deadline_in_seconds); npm ERR! | ^~~~~~~~~~~~~~~~~~~~~~~~ npm ERR! ../../nan/nan.h: In function 'void Nan::AsyncQueueWorker(AsyncWorker*)': npm ERR! ../../nan/nan.h:2232: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! 2232 | , 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>, GetterCallback, SetterCallback, v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute, imp::Sig)': npm ERR! ../../nan/nan.h:2470: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! 2470 | tpl->SetAccessor( npm ERR! | ~~~~~~~~~~~~~~~~^ npm ERR! 2471 | name npm ERR! | ~~~~ npm ERR! 2472 | , getter_ npm ERR! | ~~~~~~~~~ npm ERR! 2473 | , setter_ npm ERR! | ~~~~~~~~~ npm ERR! 2474 | , obj npm ERR! | ~~~~~ npm ERR! 2475 | , settings npm ERR! | ~~~~~~~~~~ npm ERR! 2476 | , attribute npm ERR! | ~~~~~~~~~~~ npm ERR! 2477 | , signature); npm ERR! | ~~~~~~~~~~~~ npm ERR! In file included from /root/.cache/node-gyp/20.10.0/include/node/v8-function.h:15, npm ERR! from /root/.cache/node-gyp/20.10.0/include/node/v8.h:33: npm ERR! /root/.cache/node-gyp/20.10.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.10.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.10.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.10.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! In file included from /usr/include/c++/13/cassert:44, npm ERR! from /root/.cache/node-gyp/20.10.0/include/node/node_object_wrap.h:26, npm ERR! from ../../nan/nan.h:55: npm ERR! ../../nan/nan_object_wrap.h: In destructor 'virtual Nan::ObjectWrap::~ObjectWrap()': npm ERR! ../../nan/nan_object_wrap.h:24:25: error: 'class Nan::Persistent<v8::Object>' has no member named 'IsNearDeath' npm ERR! 24 | assert(persistent().IsNearDeath()); npm ERR! | ^~~~~~~~~~~ npm ERR! ../../nan/nan_object_wrap.h: In static member function 'static void Nan::ObjectWrap::WeakCallback(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)': npm ERR! ../../nan/nan_object_wrap.h:127:26: error: 'class Nan::Persistent<v8::Object>' has no member named 'IsNearDeath' npm ERR! 127 | assert(wrap->handle_.IsNearDeath()); npm ERR! | ^~~~~~~~~~~ npm ERR! In file included from ../../nan/nan.h:2818: npm ERR! ../../nan/nan_typedarray_contents.h: In constructor 'Nan::TypedArrayContents<T>::TypedArrayContents(v8::Local<v8::Value>)': npm ERR! ../../nan/nan_typedarray_contents.h:34:43: error: 'class v8::ArrayBuffer' has no member named 'GetContents' npm ERR! 34 | data = static_cast<char*>(buffer->GetContents().Data()) + byte_offset; 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:41:47: error: no matching function for call to 'v8::Value::ToString()' npm ERR! 41 | v8::String::Utf8Value path(info[0]->ToString()); npm ERR! | ~~~~~~~~~~~~~~~~~^~ npm ERR! In file included from /root/.cache/node-gyp/20.10.0/include/node/v8-primitive.h:11, npm ERR! from /root/.cache/node-gyp/20.10.0/include/node/v8-object.h:11, npm ERR! from /root/.cache/node-gyp/20.10.0/include/node/v8-array-buffer.h:13, npm ERR! from /root/.cache/node-gyp/20.10.0/include/node/v8.h:24: npm ERR! /root/.cache/node-gyp/20.10.0/include/node/v8-value.h:370:44: note: candidate: 'v8::MaybeLocal<v8::String> v8::Value::ToString(v8::Local<v8::Context>) const' npm ERR! 370 | V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString( npm ERR! | ^~~~~~~~ npm ERR! /root/.cache/node-gyp/20.10.0/include/node/v8-value.h:370:44: note: candidate expects 1 argument, 0 provided npm ERR! ../src/serialport.cpp:48:52: error: no matching function for call to 'v8::Value::ToObject()' npm ERR! 48 | v8::Local<v8::Object> options = info[1]->ToObject(); npm ERR! | ~~~~~~~~~~~~~~~~~^~ npm ERR! /root/.cache/node-gyp/20.10.0/include/node/v8-value.h:382:44: note: candidate: 'v8::MaybeLocal<v8::Object> v8::Value::ToObject(v8::Local<v8::Context>) const' npm ERR! 382 | V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject( npm ERR! | ^~~~~~~~ npm ERR! /root/.cache/node-gyp/20.10.0/include/node/v8-value.h:382:44: note: candidate expects 1 argument, 0 provided 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 'void EIO_AfterOpen(uv_work_t*)': npm ERR! ../src/serialport.cpp:95:22: warning: 'v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const' is deprecated [-Wdeprecated-declarations] npm ERR! 95 | data->callback.Call(2, argv); npm ERR! | ~~~~~~~~~~~~~~~~~~~^~~~~~~~~ npm ERR! ../../nan/nan.h:1674:3: note: declared here npm ERR! 1674 | Call(int argc, v8::Local<v8::Value> argv[]) const { 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:113:52: error: no matching function for call to 'v8::Value::ToObject()' npm ERR! 113 | v8::Local<v8::Object> options = info[1]->ToObject(); npm ERR! | ~~~~~~~~~~~~~~~~~^~ npm ERR! /root/.cache/node-gyp/20.10.0/include/node/v8-value.h:382:44: note: candidate: 'v8::MaybeLocal<v8::Object> v8::Value::ToObject(v8::Local<v8::Context>) const' npm ERR! 382 | V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject( npm ERR! | ^~~~~~~~ npm ERR! /root/.cache/node-gyp/20.10.0/include/node/v8-value.h:382:44: note: candidate expects 1 argument, 0 provided 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 'void EIO_AfterUpdate(uv_work_t*)': npm ERR! ../src/serialport.cpp:150:22: warning: 'v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const' is deprecated [-Wdeprecated-declarations] npm ERR! 150 | data->callback.Call(1, argv); npm ERR! | ~~~~~~~~~~~~~~~~~~~^~~~~~~~~ npm ERR! ../../nan/nan.h:1674:3: note: declared here npm ERR! 1674 | Call(int argc, v8::Local<v8::Value> argv[]) const { 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 'void EIO_AfterClose(uv_work_t*)': npm ERR! ../src/serialport.cpp:188:22: warning: 'v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const' is deprecated [-Wdeprecated-declarations] npm ERR! 188 | data->callback.Call(1, argv); npm ERR! | ~~~~~~~~~~~~~~~~~~~^~~~~~~~~ npm ERR! ../../nan/nan.h:1674:3: note: declared here npm ERR! 1674 | Call(int argc, v8::Local<v8::Value> argv[]) const { 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 'void EIO_AfterFlush(uv_work_t*)': npm ERR! ../src/serialport.cpp:231:22: warning: 'v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const' is deprecated [-Wdeprecated-declarations] npm ERR! 231 | data->callback.Call(1, argv); npm ERR! | ~~~~~~~~~~~~~~~~~~~^~~~~~~~~ npm ERR! ../../nan/nan.h:1674:3: note: declared here npm ERR! 1674 | Call(int argc, v8::Local<v8::Value> argv[]) const { 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:250:52: error: no matching function for call to 'v8::Value::ToObject()' npm ERR! 250 | v8::Local<v8::Object> options = info[1]->ToObject(); npm ERR! | ~~~~~~~~~~~~~~~~~^~ npm ERR! /root/.cache/node-gyp/20.10.0/include/node/v8-value.h:382:44: note: candidate: 'v8::MaybeLocal<v8::Object> v8::Value::ToObject(v8::Local<v8::Context>) const' npm ERR! 382 | V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject( npm ERR! | ^~~~~~~~ npm ERR! /root/.cache/node-gyp/20.10.0/include/node/v8-value.h:382:44: note: candidate expects 1 argument, 0 provided 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 'void EIO_AfterSet(uv_work_t*)': npm ERR! ../src/serialport.cpp:285:22: warning: 'v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const' is deprecated [-Wdeprecated-declarations] npm ERR! 285 | data->callback.Call(1, argv); npm ERR! | ~~~~~~~~~~~~~~~~~~~^~~~~~~~~ npm ERR! ../../nan/nan.h:1674:3: note: declared here npm ERR! 1674 | Call(int argc, v8::Local<v8::Value> argv[]) const { 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 'void EIO_AfterGet(uv_work_t*)': npm ERR! ../src/serialport.cpp:329:17: error: no matching function for call to 'v8::Object::Set(v8::Local<v8::String>, Nan::imp::FactoryBase<v8::Boolean>::return_t)' npm ERR! 329 | results->Set(Nan::New<v8::String>("cts").ToLocalChecked(), Nan::New<v8::Boolean>(data->cts)); npm ERR! | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ npm ERR! /root/.cache/node-gyp/20.10.0/include/node/v8-object.h:246:37: note: candidate: 'v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)' npm ERR! 246 | V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, npm ERR! | ^~~ npm ERR! /root/.cache/node-gyp/20.10.0/include/node/v8-object.h:246:37: note: candidate expects 3 arguments, 2 provided npm ERR! /root/.cache/node-gyp/20.10.0/include/node/v8-object.h:249:37: note: candidate: 'v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)' npm ERR! 249 | V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index, npm ERR! | ^~~ npm ERR! /root/.cache/node-gyp/20.10.0/include/node/v8-object.h:249:37: note: candidate expects 3 arguments, 2 provided npm ERR! ../src/serialport.cpp:330:17: error: no matching function for call to 'v8::Object::Set(v8::Local<v8::String>, Nan::imp::FactoryBase<v8::Boolean>::return_t)' npm ERR! 330 | results->Set(Nan::New<v8::String>("dsr").ToLocalChecked(), Nan::New<v8::Boolean>(data->dsr)); npm ERR! | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ npm ERR! /root/.cache/node-gyp/20.10.0/include/node/v8-object.h:246:37: note: candidate: 'v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)' npm ERR! 246 | V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, npm ERR! | ^~~ npm ERR! /root/.cache/node-gyp/20.10.0/include/node/v8-object.h:246:37: note: candidate expects 3 arguments, 2 provided npm ERR! /root/.cache/node-gyp/20.10.0/include/node/v8-object.h:249:37: note: candidate: 'v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)' npm ERR! 249 | V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index, npm ERR! | ^~~ npm ERR! /root/.cache/node-gyp/20.10.0/include/node/v8-object.h:249:37: note: candidate expects 3 arguments, 2 provided npm ERR! ../src/serialport.cpp:331:17: error: no matching function for call to 'v8::Object::Set(v8::Local<v8::String>, Nan::imp::FactoryBase<v8::Boolean>::return_t)' npm ERR! 331 | results->Set(Nan::New<v8::String>("dcd").ToLocalChecked(), Nan::New<v8::Boolean>(data->dcd)); npm ERR! | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ npm ERR! /root/.cache/node-gyp/20.10.0/include/node/v8-object.h:246:37: note: candidate: 'v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)' npm ERR! 246 | V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, npm ERR! | ^~~ npm ERR! /root/.cache/node-gyp/20.10.0/include/node/v8-object.h:246:37: note: candidate expects 3 arguments, 2 provided npm ERR! /root/.cache/node-gyp/20.10.0/include/node/v8-object.h:249:37: note: candidate: 'v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)' npm ERR! 249 | V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index, npm ERR! | ^~~ npm ERR! /root/.cache/node-gyp/20.10.0/include/node/v8-object.h:249:37: note: candidate expects 3 arguments, 2 provided npm ERR! ../src/serialport.cpp:336:22: warning: 'v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const' is deprecated [-Wdeprecated-declarations] npm ERR! 336 | data->callback.Call(2, argv); npm ERR! | ~~~~~~~~~~~~~~~~~~~^~~~~~~~~ npm ERR! ../../nan/nan.h:1674:3: note: declared here npm ERR! 1674 | Call(int argc, v8::Local<v8::Value> argv[]) const { 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:362: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! 362 | uv_queue_work(uv_default_loop(), req, EIO_Drain, (uv_after_work_cb)EIO_AfterDrain); npm ERR! | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ npm ERR! ../src/serialport.cpp: In function 'void EIO_AfterDrain(uv_work_t*)': npm ERR! ../src/serialport.cpp:377:22: warning: 'v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const' is deprecated [-Wdeprecated-declarations] npm ERR! 377 | data->callback.Call(1, argv); npm ERR! | ~~~~~~~~~~~~~~~~~~~^~~~~~~~~ npm ERR! ../../nan/nan.h:1674:3: note: declared here npm ERR! 1674 | Call(int argc, v8::Local<v8::Value> argv[]) const { npm ERR! | ^~~~ npm ERR! ../src/serialport.cpp: At global scope: npm ERR! ../src/serialport.cpp:383:28: warning: unnecessary parentheses in declaration of 'ToParityEnum' [-Wparentheses] npm ERR! 383 | SerialPortParity NAN_INLINE(ToParityEnum(const v8::Local<v8::String>& v8str)) { npm ERR! | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ npm ERR! ../src/serialport.cpp:383:28: note: remove parentheses npm ERR! 383 | SerialPortParity NAN_INLINE(ToParityEnum(const v8::Local<v8::String>& v8str)) { npm ERR! | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ npm ERR! | - - npm ERR! ../src/serialport.cpp:402:30: warning: unnecessary parentheses in declaration of 'ToStopBitEnum' [-Wparentheses] npm ERR! 402 | SerialPortStopBits NAN_INLINE(ToStopBitEnum(double stopBits)) { npm ERR! | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ npm ERR! ../src/serialport.cpp:402:30: note: remove parentheses npm ERR! 402 | SerialPortStopBits NAN_INLINE(ToStopBitEnum(double stopBits)) { npm ERR! | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ npm ERR! | - - npm ERR! ../src/serialport.cpp:413:8: error: variable or field 'init' declared void npm ERR! 413 | void init(v8::Handle<v8::Object> target) { npm ERR! | ^~~~ npm ERR! ../src/serialport.cpp:413:17: error: 'Handle' is not a member of 'v8'; did you mean 'JobHandle'? npm ERR! 413 | void init(v8::Handle<v8::Object> target) { npm ERR! | ^~~~~~ npm ERR! | JobHandle npm ERR! ../src/serialport.cpp:413:34: error: expected primary-expression before '>' token npm ERR! 413 | void init(v8::Handle<v8::Object> target) { npm ERR! | ^ npm ERR! ../src/serialport.cpp:413:36: error: 'target' was not declared in this scope npm ERR! 413 | void init(v8::Handle<v8::Object> target) { npm ERR! | ^~~~~~ npm ERR! ../src/serialport.cpp:437:25: error: 'init' was not declared in this scope; did you mean 'int'? npm ERR! 437 | NODE_MODULE(serialport, init); npm ERR! | ^~~~ npm ERR! /root/.cache/node-gyp/20.10.0/include/node/node.h:1172:36: note: in definition of macro 'NODE_MODULE_X' npm ERR! 1172 | (node::addon_register_func) (regfunc), \ npm ERR! | ^~~~~~~ npm ERR! ../src/serialport.cpp:437:1: note: in expansion of macro 'NODE_MODULE' npm ERR! 437 | NODE_MODULE(serialport, init); npm ERR! | ^~~~~~~~~~~ npm ERR! make: *** [serialport.target.mk:114: Release/obj.target/serialport/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.<anonymous> (/usr/lib/node_modules_20/npm/node_modules/node-gyp/lib/build.js:209:23) npm ERR! gyp ERR! System Linux 6.6.7-200.fc39.x86_64 npm ERR! gyp ERR! command "/usr/bin/node-20" "/usr/lib/node_modules_20/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" npm ERR! gyp ERR! cwd /chattervox/node_modules/serialport npm ERR! gyp ERR! node -v v20.10.0 npm ERR! gyp ERR! node-gyp -v v10.0.1 npm ERR! gyp ERR! not ok npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2024-01-22T13_27_00_145Z-debug-0.log Error: building at STEP "RUN git clone https://github.com/brannondorsey/chattervox && cd chattervox && npm install && npm run build": while running runtime: exit status 1
Hello from the future.
This is a cool project, thank you.
The binary is working fine but I wanted to try to build it myself and ran into issues.
Can you provide any pointers or suggestions? I'm happy to help here any way I can, although I'm more familiar with python.
I did try to update some of the deps in package.json but was only able to create a different set of errors. :)
LMK how I can help.
Here is a recreate Containerfile