swift-nav/libsbp

JavaScript build error in serialport

Closed this issue · 2 comments

This looks like nodejs/nan#735 , and using serialport 9.0.7 fixed it for me.

npm ERR! code 1
npm ERR! path /Users/john.vandenberg/work/libsbp/node_modules/serialport
npm ERR! command failed
npm ERR! command sh -c prebuild-install || node-gyp rebuild
npm ERR! CXX(target) Release/obj.target/serialport/src/serialport.o
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@7.1.2
npm ERR! gyp info using node@15.11.0 | darwin | x64
npm ERR! gyp info find Python using Python version 3.8.5 found at "/usr/local/Caskroom/miniconda/base/bin/python3"
npm ERR! gyp info spawn /usr/local/Caskroom/miniconda/base/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/usr/local/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   '/Users/john.vandenberg/work/libsbp/node_modules/serialport/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/john.vandenberg/Library/Caches/node-gyp/15.11.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=/Users/john.vandenberg/Library/Caches/node-gyp/15.11.0',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/Users/john.vandenberg/Library/Caches/node-gyp/15.11.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/Users/john.vandenberg/work/libsbp/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 ../src/serialport.cpp:1:
npm ERR! In file included from ../src/./serialport.h:6:
npm ERR! In file included from ../../nan/nan.h:202:
npm ERR! In file included from ../../nan/nan_converters.h:67:
npm ERR! ../../nan/nan_converters_43_inl.h:22:1: error: no viable conversion from 'Local<v8::Context>' to 'v8::Isolate *'
npm ERR! X(Boolean)
npm ERR! ^~~~~~~~~~
npm ERR! ../../nan/nan_converters_43_inl.h:18:23: note: expanded from macro 'X'
npm ERR!       val->To ## TYPE(isolate->GetCurrentContext())                            \
npm ERR!                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! /Users/john.vandenberg/Library/Caches/node-gyp/15.11.0/include/node/v8.h:2894:37: note: passing argument to parameter 'isolate' here
npm ERR!   Local<Boolean> ToBoolean(Isolate* isolate) const;
npm ERR!                                     ^
npm ERR! In file included from ../src/serialport.cpp:1:
npm ERR! In file included from ../src/./serialport.h:6:
npm ERR! In file included from ../../nan/nan.h:202:
npm ERR! In file included from ../../nan/nan_converters.h:67:
npm ERR! ../../nan/nan_converters_43_inl.h:40:1: error: no viable conversion from 'Local<v8::Context>' to 'v8::Isolate *'
npm ERR! X(bool, Boolean)
npm ERR! ^~~~~~~~~~~~~~~~
npm ERR! ../../nan/nan_converters_43_inl.h:37:29: note: expanded from macro 'X'
npm ERR!   return val->NAME ## Value(isolate->GetCurrentContext());                     \
npm ERR!                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! /Users/john.vandenberg/Library/Caches/node-gyp/15.11.0/include/node/v8.h:2904:30: note: passing argument to parameter 'isolate' here
npm ERR!   bool BooleanValue(Isolate* isolate) const;
npm ERR!                              ^
npm ERR! In file included from ../src/serialport.cpp:1:
npm ERR! In file included from ../src/./serialport.h:6:
npm ERR! In file included from ../../nan/nan.h:203:
npm ERR! In file included from ../../nan/nan_new.h:189:
npm ERR! ../../nan/nan_implementation_12_inl.h:103:42: error: no viable conversion from 'v8::Isolate *' to 'Local<v8::Context>'
npm ERR!   return scope.Escape(v8::Function::New( isolate
npm ERR!                                          ^~~~~~~
npm ERR! /Users/john.vandenberg/Library/Caches/node-gyp/15.11.0/include/node/v8.h:194:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'v8::Isolate *' to 'const v8::Local<v8::Context> &' for 1st argument
npm ERR! class Local {
npm ERR!       ^
npm ERR! /Users/john.vandenberg/Library/Caches/node-gyp/15.11.0/include/node/v8.h:194:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'v8::Isolate *' to 'v8::Local<v8::Context> &&' for 1st argument
npm ERR! /Users/john.vandenberg/Library/Caches/node-gyp/15.11.0/include/node/v8.h:198:13: note: candidate template ignored: could not match 'Local<type-parameter-0-0>' against 'v8::Isolate *'
npm ERR!   V8_INLINE Local(Local<S> that)
npm ERR!             ^
npm ERR! /Users/john.vandenberg/Library/Caches/node-gyp/15.11.0/include/node/v8.h:4492:22: note: passing argument to parameter 'context' here
npm ERR!       Local<Context> context, FunctionCallback callback,
npm ERR!                      ^
npm ERR! In file included from ../src/serialport.cpp:1:
npm ERR! In file included from ../src/./serialport.h:6:
npm ERR! In file included from ../../nan/nan.h:203:
npm ERR! In file included from ../../nan/nan_new.h:189:
npm ERR! ../../nan/nan_implementation_12_inl.h:337:37: error: too few arguments to function call, expected 2, have 1
npm ERR!   return v8::StringObject::New(value).As<v8::StringObject>();
npm ERR!          ~~~~~~~~~~~~~~~~~~~~~      ^
npm ERR! /Users/john.vandenberg/Library/Caches/node-gyp/15.11.0/include/node/v8.h:5900:3: note: 'New' declared here
npm ERR!   static Local<Value> New(Isolate* isolate, Local<String> value);
npm ERR!   ^
npm ERR! In file included from ../src/serialport.cpp:1:
npm ERR! In file included from ../src/./serialport.h:6:
npm ERR! ../../nan/nan.h:1034:53: error: too few arguments to function call, single argument 'context' was not specified
npm ERR!       v8::Local<v8::String> string = from->ToString();
npm ERR!                                      ~~~~~~~~~~~~~~ ^
npm ERR! /Users/john.vandenberg/Library/Caches/node-gyp/15.11.0/include/node/v8.h:2856:3: note: 'ToString' declared here
npm ERR!   V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
npm ERR!   ^
npm ERR! /Users/john.vandenberg/Library/Caches/node-gyp/15.11.0/include/node/v8config.h:431:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
npm ERR! #define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
npm ERR!                               ^
npm ERR! In file included from ../src/serialport.cpp:1:
npm ERR! In file included from ../src/./serialport.h:6:
npm ERR! ../../nan/nan.h:1044:37: error: cannot initialize a parameter of type 'v8::Isolate *' with an lvalue of type 'char *'
npm ERR!         length_ = string->WriteUtf8(str_, static_cast<int>(len), 0, flags);
npm ERR!                                     ^~~~
npm ERR! /Users/john.vandenberg/Library/Caches/node-gyp/15.11.0/include/node/v8.h:3083:26: note: passing argument to parameter 'isolate' here
npm ERR!   int WriteUtf8(Isolate* isolate, char* buffer, int length = -1,
npm ERR!                          ^
npm ERR! In file included from ../src/serialport.cpp:1:
npm ERR! In file included from ../src/./serialport.h:6:
npm ERR! ../../nan/nan.h:1818:28: error: no matching member function for call to 'Set'
npm ERR!     New(persistentHandle)->Set(New(key).ToLocalChecked(), value);
npm ERR!     ~~~~~~~~~~~~~~~~~~~~~~~^~~
npm ERR! /Users/john.vandenberg/Library/Caches/node-gyp/15.11.0/include/node/v8.h:3716:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
npm ERR!   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
npm ERR!                                     ^
npm ERR! /Users/john.vandenberg/Library/Caches/node-gyp/15.11.0/include/node/v8.h:3719:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
npm ERR!   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
npm ERR!                                     ^
npm ERR! In file included from ../src/serialport.cpp:1:
npm ERR! In file included from ../src/./serialport.h:6:
npm ERR! ../../nan/nan.h:1824:28: error: no matching member function for call to 'Set'
npm ERR!     New(persistentHandle)->Set(key, value);
npm ERR!     ~~~~~~~~~~~~~~~~~~~~~~~^~~
npm ERR! /Users/john.vandenberg/Library/Caches/node-gyp/15.11.0/include/node/v8.h:3716:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
npm ERR!   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
npm ERR!                                     ^
npm ERR! /Users/john.vandenberg/Library/Caches/node-gyp/15.11.0/include/node/v8.h:3719:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
npm ERR!   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
npm ERR!                                     ^
npm ERR! In file included from ../src/serialport.cpp:1:
npm ERR! In file included from ../src/./serialport.h:6:
npm ERR! ../../nan/nan.h:1830:28: error: no matching member function for call to 'Set'
npm ERR!     New(persistentHandle)->Set(index, value);
npm ERR!     ~~~~~~~~~~~~~~~~~~~~~~~^~~
npm ERR! /Users/john.vandenberg/Library/Caches/node-gyp/15.11.0/include/node/v8.h:3716:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
npm ERR!   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
npm ERR!                                     ^
npm ERR! /Users/john.vandenberg/Library/Caches/node-gyp/15.11.0/include/node/v8.h:3719:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
npm ERR!   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
npm ERR!                                     ^
npm ERR! In file included from ../src/serialport.cpp:1:
npm ERR! In file included from ../src/./serialport.h:6:
npm ERR! ../../nan/nan.h:1836:32: error: no matching member function for call to 'Get'
npm ERR!         New(persistentHandle)->Get(New(key).ToLocalChecked()));
npm ERR!         ~~~~~~~~~~~~~~~~~~~~~~~^~~
npm ERR! /Users/john.vandenberg/Library/Caches/node-gyp/15.11.0/include/node/v8.h:3763:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
npm ERR!   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
npm ERR!                                           ^
npm ERR! /Users/john.vandenberg/Library/Caches/node-gyp/15.11.0/include/node/v8.h:3766:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
npm ERR!   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
npm ERR!                                           ^
npm ERR! In file included from ../src/serialport.cpp:1:
npm ERR! In file included from ../src/./serialport.h:6:
npm ERR! ../../nan/nan.h:1842:48: error: no matching member function for call to 'Get'
npm ERR!     return scope.Escape(New(persistentHandle)->Get(key));
npm ERR!                         ~~~~~~~~~~~~~~~~~~~~~~~^~~
npm ERR! /Users/john.vandenberg/Library/Caches/node-gyp/15.11.0/include/node/v8.h:3763:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
npm ERR!   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
npm ERR!                                           ^
npm ERR! /Users/john.vandenberg/Library/Caches/node-gyp/15.11.0/include/node/v8.h:3766:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
npm ERR!   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
npm ERR!                                           ^
npm ERR! In file included from ../src/serialport.cpp:1:
npm ERR! In file included from ../src/./serialport.h:6:
npm ERR! ../../nan/nan.h:1847:48: error: no matching member function for call to 'Get'
npm ERR!     return scope.Escape(New(persistentHandle)->Get(index));
npm ERR!                         ~~~~~~~~~~~~~~~~~~~~~~~^~~
npm ERR! /Users/john.vandenberg/Library/Caches/node-gyp/15.11.0/include/node/v8.h:3763:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
npm ERR!   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
npm ERR!                                           ^
npm ERR! /Users/john.vandenberg/Library/Caches/node-gyp/15.11.0/include/node/v8.h:3766:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
npm ERR!   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
npm ERR!                                           ^
npm ERR! In file included from ../src/serialport.cpp:1:
npm ERR! In file included from ../src/./serialport.h:6:
npm ERR! In file included from ../../nan/nan.h:2657:
npm ERR! ../../nan/nan_object_wrap.h:24:25: error: no member named 'IsNearDeath' in 'Nan::Persistent<v8::Object, v8::NonCopyablePersistentTraits<v8::Object> >'
npm ERR!     assert(persistent().IsNearDeath());
npm ERR!            ~~~~~~~~~~~~ ^
npm ERR! /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/assert.h:93:25: note: expanded from macro 'assert'
npm ERR!     (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
npm ERR!                         ^
npm ERR! In file included from ../src/serialport.cpp:1:
npm ERR! In file included from ../src/./serialport.h:6:
npm ERR! In file included from ../../nan/nan.h:2657:
npm ERR! ../../nan/nan_object_wrap.h:67:18: error: no member named 'MarkIndependent' in 'Nan::Persistent<v8::Object, v8::NonCopyablePersistentTraits<v8::Object> >'
npm ERR!     persistent().MarkIndependent();
npm ERR!     ~~~~~~~~~~~~ ^
npm ERR! ../../nan/nan_object_wrap.h:124:26: error: no member named 'IsNearDeath' in 'Nan::Persistent<v8::Object, v8::NonCopyablePersistentTraits<v8::Object> >'
npm ERR!     assert(wrap->handle_.IsNearDeath());
npm ERR!            ~~~~~~~~~~~~~ ^
npm ERR! /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/assert.h:93:25: note: expanded from macro 'assert'
npm ERR!     (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
npm ERR!                         ^
npm ERR! In file included from ../src/serialport.cpp:1:
npm ERR! In file included from ../src/./serialport.h:6:
npm ERR! In file included from ../../nan/nan.h:2753:
npm ERR! ../../nan/nan_typedarray_contents.h:34:43: warning: 'GetContents' is deprecated: Use GetBackingStore. See http://crbug.com/v8/9908. [-Wdeprecated-declarations]
npm ERR!       data   = static_cast<char*>(buffer->GetContents().Data()) + byte_offset;
npm ERR!                                           ^
npm ERR! /Users/john.vandenberg/Library/Caches/node-gyp/15.11.0/include/node/v8.h:5317:3: note: 'GetContents' has been explicitly marked deprecated here
npm ERR!   V8_DEPRECATE_SOON("Use GetBackingStore. See http://crbug.com/v8/9908.")
npm ERR!   ^
npm ERR! /Users/john.vandenberg/Library/Caches/node-gyp/15.11.0/include/node/v8config.h:402:39: note: expanded from macro 'V8_DEPRECATE_SOON'
npm ERR! # define V8_DEPRECATE_SOON(message) [[deprecated(message)]]
npm ERR!                                       ^
npm ERR! ../src/serialport.cpp:41:48: error: too few arguments to function call, single argument 'context' was not specified
npm ERR!   v8::String::Utf8Value path(info[0]->ToString());
npm ERR!                              ~~~~~~~~~~~~~~~~~ ^
npm ERR! /Users/john.vandenberg/Library/Caches/node-gyp/15.11.0/include/node/v8.h:2856:3: note: 'ToString' declared here
npm ERR!   V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
npm ERR!   ^
npm ERR! /Users/john.vandenberg/Library/Caches/node-gyp/15.11.0/include/node/v8config.h:431:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
npm ERR! #define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
npm ERR!                               ^
npm ERR! ../src/serialport.cpp:48:53: error: too few arguments to function call, single argument 'context' was not specified
npm ERR!   v8::Local<v8::Object> options = info[1]->ToObject();
npm ERR!                                   ~~~~~~~~~~~~~~~~~ ^
npm ERR! /Users/john.vandenberg/Library/Caches/node-gyp/15.11.0/include/node/v8.h:2868:3: note: 'ToObject' declared here
npm ERR!   V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
npm ERR!   ^
npm ERR! /Users/john.vandenberg/Library/Caches/node-gyp/15.11.0/include/node/v8config.h:431:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
npm ERR! #define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
npm ERR!                               ^
npm ERR! ../src/serialport.cpp:57:46: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
npm ERR!   snprintf(baton->path, sizeof(baton->path), *path);
npm ERR!                                              ^~~~~
npm ERR! ../src/serialport.cpp:57:46: note: treat the string as an argument to avoid this
npm ERR!   snprintf(baton->path, sizeof(baton->path), *path);
npm ERR!                                              ^
npm ERR!                                              "%s",
npm ERR! ../src/serialport.cpp:95:18: warning: 'Call' is deprecated [-Wdeprecated-declarations]
npm ERR!   data->callback.Call(2, argv);
npm ERR!                  ^
npm ERR! ../../nan/nan.h:1617:3: note: 'Call' has been explicitly marked deprecated here
npm ERR!   NAN_DEPRECATED inline v8::Local<v8::Value>
npm ERR!   ^
npm ERR! ../../nan/nan.h:98:40: note: expanded from macro 'NAN_DEPRECATED'
npm ERR! # define NAN_DEPRECATED __attribute__((deprecated))
npm ERR!                                        ^
npm ERR! ../src/serialport.cpp:113:53: error: too few arguments to function call, single argument 'context' was not specified
npm ERR!   v8::Local<v8::Object> options = info[1]->ToObject();
npm ERR!                                   ~~~~~~~~~~~~~~~~~ ^
npm ERR! /Users/john.vandenberg/Library/Caches/node-gyp/15.11.0/include/node/v8.h:2868:3: note: 'ToObject' declared here
npm ERR!   V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
npm ERR!   ^
npm ERR! /Users/john.vandenberg/Library/Caches/node-gyp/15.11.0/include/node/v8config.h:431:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
npm ERR! #define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
npm ERR!                               ^
npm ERR! ../src/serialport.cpp:150:18: warning: 'Call' is deprecated [-Wdeprecated-declarations]
npm ERR!   data->callback.Call(1, argv);
npm ERR!                  ^
npm ERR! ../../nan/nan.h:1617:3: note: 'Call' has been explicitly marked deprecated here
npm ERR!   NAN_DEPRECATED inline v8::Local<v8::Value>
npm ERR!   ^
npm ERR! ../../nan/nan.h:98:40: note: expanded from macro 'NAN_DEPRECATED'
npm ERR! # define NAN_DEPRECATED __attribute__((deprecated))
npm ERR!                                        ^
npm ERR! ../src/serialport.cpp:188:18: warning: 'Call' is deprecated [-Wdeprecated-declarations]
npm ERR!   data->callback.Call(1, argv);
npm ERR!                  ^
npm ERR! ../../nan/nan.h:1617:3: note: 'Call' has been explicitly marked deprecated here
npm ERR!   NAN_DEPRECATED inline v8::Local<v8::Value>
npm ERR!   ^
npm ERR! ../../nan/nan.h:98:40: note: expanded from macro 'NAN_DEPRECATED'
npm ERR! # define NAN_DEPRECATED __attribute__((deprecated))
npm ERR!                                        ^
npm ERR! ../src/serialport.cpp:231:18: warning: 'Call' is deprecated [-Wdeprecated-declarations]
npm ERR!   data->callback.Call(1, argv);
npm ERR!                  ^
npm ERR! ../../nan/nan.h:1617:3: note: 'Call' has been explicitly marked deprecated here
npm ERR!   NAN_DEPRECATED inline v8::Local<v8::Value>
npm ERR!   ^
npm ERR! ../../nan/nan.h:98:40: note: expanded from macro 'NAN_DEPRECATED'
npm ERR! # define NAN_DEPRECATED __attribute__((deprecated))
npm ERR!                                        ^
npm ERR! ../src/serialport.cpp:250:53: error: too few arguments to function call, single argument 'context' was not specified
npm ERR!   v8::Local<v8::Object> options = info[1]->ToObject();
npm ERR!                                   ~~~~~~~~~~~~~~~~~ ^
npm ERR! /Users/john.vandenberg/Library/Caches/node-gyp/15.11.0/include/node/v8.h:2868:3: note: 'ToObject' declared here
npm ERR!   V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
npm ERR!   ^
npm ERR! /Users/john.vandenberg/Library/Caches/node-gyp/15.11.0/include/node/v8config.h:431:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
npm ERR! #define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
npm ERR!                               ^
npm ERR! ../src/serialport.cpp:285:18: warning: 'Call' is deprecated [-Wdeprecated-declarations]
npm ERR!   data->callback.Call(1, argv);
npm ERR!                  ^
npm ERR! ../../nan/nan.h:1617:3: note: 'Call' has been explicitly marked deprecated here
npm ERR!   NAN_DEPRECATED inline v8::Local<v8::Value>
npm ERR!   ^
npm ERR! ../../nan/nan.h:98:40: note: expanded from macro 'NAN_DEPRECATED'
npm ERR! # define NAN_DEPRECATED __attribute__((deprecated))
npm ERR!                                        ^
npm ERR! fatal error: too many errors emitted, stopping now [-ferror-limit=]
npm ERR! 7 warnings and 20 errors generated.
npm ERR! make[1]: *** [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.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:378:20)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Darwin 20.3.0
npm ERR! gyp ERR! command "/usr/local/Cellar/node/15.11.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /Users/john.vandenberg/work/libsbp/node_modules/serialport
npm ERR! gyp ERR! node -v v15.11.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!     /Users/john.vandenberg/.npm/_logs/2021-03-15T22_31_38_011Z-debug.log
make: *** [deps-javascript] Error 1

The CI is using node 8 which is why this wont be happening there.

Also, related, the repo is pinning npm to v6 in some places, and has "lockfileVersion": 1 in package-lock.json.

Using a latter node, and npm, causes the lock file version to be 2, but according to https://docs.npmjs.com/cli/v7/configuring-npm/package-lock-json it is backwards compatible with lock file v1

Fixed in #905