tojocky / node-printer

Native node.js printer
1.51k stars 436 forks source link

Build fails on Node 12 #289

Closed philipptrenz closed 3 years ago

philipptrenz commented 4 years ago

Hey there, I'm about to build printer on X64 with Node v12 and yarn against Electron 8.2.0 by help of electron-rebuild, but the process fails with the following error message:

➜  photo-booth-new git:(master) βœ— yarn install
yarn install v1.12.3
[1/4] πŸ”  Resolving packages...
success Already up-to-date.
$ ./node_modules/.bin/electron-rebuild
βœ– Rebuild Failed

An unhandled error occurred inside electron-rebuild
gyp info it worked if it ends with ok
gyp info using node-gyp@6.1.0
gyp info using node@12.1.0 | darwin | x64
gyp info find Python using Python version 3.7.5 found at "/usr/local/opt/python/bin/python3.7"
gyp info spawn /usr/local/opt/python/bin/python3.7
gyp info spawn args [
gyp info spawn args   '/Users/philipp/git/photo-booth-new/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   '/Users/philipp/git/photo-booth-new/node_modules/printer/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/philipp/git/photo-booth-new/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/philipp/.electron-gyp/8.2.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=/Users/philipp/.electron-gyp/8.2.0',
gyp info spawn args   '-Dnode_gyp_dir=/Users/philipp/git/photo-booth-new/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/philipp/.electron-gyp/8.2.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/philipp/git/photo-booth-new/node_modules/printer',
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' ]
  CXX(target) Release/obj.target/node_printer/src/node_printer_posix.o
In file included from ../src/node_printer_posix.cc:1:
In file included from ../src/node_printer.hpp:4:
In file included from ../src/macros.hh:4:
In file included from ../../nan/nan.h:2884:
../../nan/nan_typedarray_contents.h:34:43: warning: 'GetContents' is deprecated: Use GetBackingStore. See http://crbug.com/v8/9908. [-Wdeprecated-declarations]
      data   = static_cast<char*>(buffer->GetContents().Data()) + byte_offset;
                                          ^
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:5163:3: note: 'GetContents' has been explicitly marked deprecated here
  V8_DEPRECATE_SOON("Use GetBackingStore. See http://crbug.com/v8/9908.")
  ^
/Users/philipp/.electron-gyp/8.2.0/include/node/v8config.h:409:41: note: expanded from macro 'V8_DEPRECATE_SOON'
#   define V8_DEPRECATE_SOON(message) [[deprecated(message)]]
                                        ^
../src/node_printer_posix.cc:76:9: error: no matching member function for call to 'Set'
        MY_NODE_SET_OBJECT_PROP(result_printer_job, "id", V8_VALUE_NEW(Number, job->id));
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:14:53: note: expanded from macro 'MY_NODE_SET_OBJECT_PROP'
#  define MY_NODE_SET_OBJECT_PROP(object, id, prop) MY_NODE_SET_OBJECT(object, V8_STRING_NEW_UTF8(id), prop)
                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:13:56: note: expanded from macro 'MY_NODE_SET_OBJECT'
#  define MY_NODE_SET_OBJECT(object, id, prop) object->Set(id, prop)
                                               ~~~~~~~~^~~
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3611:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3614:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/node_printer_posix.cc:77:9: error: no matching member function for call to 'Set'
        MY_NODE_SET_OBJECT_PROP(result_printer_job, "name", V8_STRING_NEW_UTF8(job->title));
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:14:53: note: expanded from macro 'MY_NODE_SET_OBJECT_PROP'
#  define MY_NODE_SET_OBJECT_PROP(object, id, prop) MY_NODE_SET_OBJECT(object, V8_STRING_NEW_UTF8(id), prop)
                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:13:56: note: expanded from macro 'MY_NODE_SET_OBJECT'
#  define MY_NODE_SET_OBJECT(object, id, prop) object->Set(id, prop)
                                               ~~~~~~~~^~~
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3611:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3614:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/node_printer_posix.cc:78:9: error: no matching member function for call to 'Set'
        MY_NODE_SET_OBJECT_PROP(result_printer_job, "printerName", V8_STRING_NEW_UTF8(job->dest));
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:14:53: note: expanded from macro 'MY_NODE_SET_OBJECT_PROP'
#  define MY_NODE_SET_OBJECT_PROP(object, id, prop) MY_NODE_SET_OBJECT(object, V8_STRING_NEW_UTF8(id), prop)
                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:13:56: note: expanded from macro 'MY_NODE_SET_OBJECT'
#  define MY_NODE_SET_OBJECT(object, id, prop) object->Set(id, prop)
                                               ~~~~~~~~^~~
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3611:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3614:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/node_printer_posix.cc:79:9: error: no matching member function for call to 'Set'
        MY_NODE_SET_OBJECT_PROP(result_printer_job, "user", V8_STRING_NEW_UTF8(job->user));
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:14:53: note: expanded from macro 'MY_NODE_SET_OBJECT_PROP'
#  define MY_NODE_SET_OBJECT_PROP(object, id, prop) MY_NODE_SET_OBJECT(object, V8_STRING_NEW_UTF8(id), prop)
                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:13:56: note: expanded from macro 'MY_NODE_SET_OBJECT'
#  define MY_NODE_SET_OBJECT(object, id, prop) object->Set(id, prop)
                                               ~~~~~~~~^~~
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3611:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3614:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/node_printer_posix.cc:92:9: error: no matching member function for call to 'Set'
        MY_NODE_SET_OBJECT_PROP(result_printer_job, "format", V8_STRING_NEW_UTF8(job_format.c_str()));
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:14:53: note: expanded from macro 'MY_NODE_SET_OBJECT_PROP'
#  define MY_NODE_SET_OBJECT_PROP(object, id, prop) MY_NODE_SET_OBJECT(object, V8_STRING_NEW_UTF8(id), prop)
                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:13:56: note: expanded from macro 'MY_NODE_SET_OBJECT'
#  define MY_NODE_SET_OBJECT(object, id, prop) object->Set(id, prop)
                                               ~~~~~~~~^~~
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3611:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3614:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/node_printer_posix.cc:93:9: error: no matching member function for call to 'Set'
        MY_NODE_SET_OBJECT_PROP(result_printer_job, "priority", V8_VALUE_NEW(Number, job->priority));
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:14:53: note: expanded from macro 'MY_NODE_SET_OBJECT_PROP'
#  define MY_NODE_SET_OBJECT_PROP(object, id, prop) MY_NODE_SET_OBJECT(object, V8_STRING_NEW_UTF8(id), prop)
                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:13:56: note: expanded from macro 'MY_NODE_SET_OBJECT'
#  define MY_NODE_SET_OBJECT(object, id, prop) object->Set(id, prop)
                                               ~~~~~~~~^~~
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3611:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3614:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/node_printer_posix.cc:94:9: error: no matching member function for call to 'Set'
        MY_NODE_SET_OBJECT_PROP(result_printer_job, "size", V8_VALUE_NEW(Number, job->size));
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:14:53: note: expanded from macro 'MY_NODE_SET_OBJECT_PROP'
#  define MY_NODE_SET_OBJECT_PROP(object, id, prop) MY_NODE_SET_OBJECT(object, V8_STRING_NEW_UTF8(id), prop)
                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:13:56: note: expanded from macro 'MY_NODE_SET_OBJECT'
#  define MY_NODE_SET_OBJECT(object, id, prop) object->Set(id, prop)
                                               ~~~~~~~~^~~
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3611:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3614:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/node_printer_posix.cc:101:17: error: no matching member function for call to 'Set'
                MY_NODE_SET_OBJECT(result_printer_job_status, i_status++, V8_STRING_NEW_UTF8(itStatus->first.c_str()));
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:13:56: note: expanded from macro 'MY_NODE_SET_OBJECT'
#  define MY_NODE_SET_OBJECT(object, id, prop) object->Set(id, prop)
                                               ~~~~~~~~^~~
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3611:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3614:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/node_printer_posix.cc:111:13: error: no matching member function for call to 'Set'
            MY_NODE_SET_OBJECT(result_printer_job_status, i_status++, V8_STRING_NEW_UTF8(s.str().c_str()));
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:13:56: note: expanded from macro 'MY_NODE_SET_OBJECT'
#  define MY_NODE_SET_OBJECT(object, id, prop) object->Set(id, prop)
                                               ~~~~~~~~^~~
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3611:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3614:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/node_printer_posix.cc:114:9: error: no matching member function for call to 'Set'
        MY_NODE_SET_OBJECT_PROP(result_printer_job, "status", result_printer_job_status);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:14:53: note: expanded from macro 'MY_NODE_SET_OBJECT_PROP'
#  define MY_NODE_SET_OBJECT_PROP(object, id, prop) MY_NODE_SET_OBJECT(object, V8_STRING_NEW_UTF8(id), prop)
                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:13:56: note: expanded from macro 'MY_NODE_SET_OBJECT'
#  define MY_NODE_SET_OBJECT(object, id, prop) object->Set(id, prop)
                                               ~~~~~~~~^~~
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3611:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3614:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/node_printer_posix.cc:123:9: error: no matching member function for call to 'Set'
        MY_NODE_SET_OBJECT_PROP(result_printer_job, "completedTime", Nan::New<v8::Date>(completedTime).ToLocalChecked());
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:14:53: note: expanded from macro 'MY_NODE_SET_OBJECT_PROP'
#  define MY_NODE_SET_OBJECT_PROP(object, id, prop) MY_NODE_SET_OBJECT(object, V8_STRING_NEW_UTF8(id), prop)
                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:13:56: note: expanded from macro 'MY_NODE_SET_OBJECT'
#  define MY_NODE_SET_OBJECT(object, id, prop) object->Set(id, prop)
                                               ~~~~~~~~^~~
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3611:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3614:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/node_printer_posix.cc:124:9: error: no matching member function for call to 'Set'
        MY_NODE_SET_OBJECT_PROP(result_printer_job, "creationTime", Nan::New<v8::Date>(creationTime).ToLocalChecked());
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:14:53: note: expanded from macro 'MY_NODE_SET_OBJECT_PROP'
#  define MY_NODE_SET_OBJECT_PROP(object, id, prop) MY_NODE_SET_OBJECT(object, V8_STRING_NEW_UTF8(id), prop)
                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:13:56: note: expanded from macro 'MY_NODE_SET_OBJECT'
#  define MY_NODE_SET_OBJECT(object, id, prop) object->Set(id, prop)
                                               ~~~~~~~~^~~
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3611:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3614:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/node_printer_posix.cc:125:9: error: no matching member function for call to 'Set'
        MY_NODE_SET_OBJECT_PROP(result_printer_job, "processingTime", Nan::New<v8::Date>(processingTime).ToLocalChecked());
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:14:53: note: expanded from macro 'MY_NODE_SET_OBJECT_PROP'
#  define MY_NODE_SET_OBJECT_PROP(object, id, prop) MY_NODE_SET_OBJECT(object, V8_STRING_NEW_UTF8(id), prop)
                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:13:56: note: expanded from macro 'MY_NODE_SET_OBJECT'
#  define MY_NODE_SET_OBJECT(object, id, prop) object->Set(id, prop)
                                               ~~~~~~~~^~~
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3611:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3614:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/node_printer_posix.cc:148:17: error: no matching member function for call to 'Set'
                MY_NODE_SET_OBJECT_PROP(ppd_suboptions, choice->choice, V8_VALUE_NEW(Boolean, static_cast<bool>(choice->marked)));
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:14:53: note: expanded from macro 'MY_NODE_SET_OBJECT_PROP'
#  define MY_NODE_SET_OBJECT_PROP(object, id, prop) MY_NODE_SET_OBJECT(object, V8_STRING_NEW_UTF8(id), prop)
                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:13:56: note: expanded from macro 'MY_NODE_SET_OBJECT'
#  define MY_NODE_SET_OBJECT(object, id, prop) object->Set(id, prop)
                                               ~~~~~~~~^~~
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3611:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3614:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/node_printer_posix.cc:151:13: error: no matching member function for call to 'Set'
            MY_NODE_SET_OBJECT_PROP(ppd_options, option->keyword, ppd_suboptions);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:14:53: note: expanded from macro 'MY_NODE_SET_OBJECT_PROP'
#  define MY_NODE_SET_OBJECT_PROP(object, id, prop) MY_NODE_SET_OBJECT(object, V8_STRING_NEW_UTF8(id), prop)
                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:13:56: note: expanded from macro 'MY_NODE_SET_OBJECT'
#  define MY_NODE_SET_OBJECT(object, id, prop) object->Set(id, prop)
                                               ~~~~~~~~^~~
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3611:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3614:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/node_printer_posix.cc:205:9: error: no matching member function for call to 'Set'
        MY_NODE_SET_OBJECT_PROP(result_printer, "name", V8_STRING_NEW_UTF8(printer->name));
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:14:53: note: expanded from macro 'MY_NODE_SET_OBJECT_PROP'
#  define MY_NODE_SET_OBJECT_PROP(object, id, prop) MY_NODE_SET_OBJECT(object, V8_STRING_NEW_UTF8(id), prop)
                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:13:56: note: expanded from macro 'MY_NODE_SET_OBJECT'
#  define MY_NODE_SET_OBJECT(object, id, prop) object->Set(id, prop)
                                               ~~~~~~~~^~~
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3611:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3614:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/node_printer_posix.cc:206:9: error: no matching member function for call to 'Set'
        MY_NODE_SET_OBJECT_PROP(result_printer, "isDefault", V8_VALUE_NEW(Boolean, static_cast<bool>(printer->is_default)));
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:14:53: note: expanded from macro 'MY_NODE_SET_OBJECT_PROP'
#  define MY_NODE_SET_OBJECT_PROP(object, id, prop) MY_NODE_SET_OBJECT(object, V8_STRING_NEW_UTF8(id), prop)
                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:13:56: note: expanded from macro 'MY_NODE_SET_OBJECT'
#  define MY_NODE_SET_OBJECT(object, id, prop) object->Set(id, prop)
                                               ~~~~~~~~^~~
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3611:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3614:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/node_printer_posix.cc:210:13: error: no matching member function for call to 'Set'
            MY_NODE_SET_OBJECT_PROP(result_printer, "instance", V8_STRING_NEW_UTF8(printer->instance));
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:14:53: note: expanded from macro 'MY_NODE_SET_OBJECT_PROP'
#  define MY_NODE_SET_OBJECT_PROP(object, id, prop) MY_NODE_SET_OBJECT(object, V8_STRING_NEW_UTF8(id), prop)
                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:13:56: note: expanded from macro 'MY_NODE_SET_OBJECT'
#  define MY_NODE_SET_OBJECT(object, id, prop) object->Set(id, prop)
                                               ~~~~~~~~^~~
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3611:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3614:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/node_printer_posix.cc:218:13: error: no matching member function for call to 'Set'
            MY_NODE_SET_OBJECT_PROP(result_printer_options, dest_option->name, V8_STRING_NEW_UTF8(dest_option->value));
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:14:53: note: expanded from macro 'MY_NODE_SET_OBJECT_PROP'
#  define MY_NODE_SET_OBJECT_PROP(object, id, prop) MY_NODE_SET_OBJECT(object, V8_STRING_NEW_UTF8(id), prop)
                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:13:56: note: expanded from macro 'MY_NODE_SET_OBJECT'
#  define MY_NODE_SET_OBJECT(object, id, prop) object->Set(id, prop)
                                               ~~~~~~~~^~~
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3611:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3614:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
1 warning and 20 errors generated.
make: *** [Release/obj.target/node_printer/src/node_printer_posix.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/philipp/git/photo-booth-new/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:196:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:256:12)
gyp ERR! System Darwin 19.4.0
gyp ERR! command "/usr/local/Cellar/node/12.1.0/bin/node" "/Users/philipp/git/photo-booth-new/node_modules/electron-rebuild/node_modules/.bin/node-gyp" "rebuild" "--target=8.2.0" "--arch=x64" "--dist-url=https://www.electronjs.org/headers" "--build-from-source" "--module_name=node_printer" "--module_path=/Users/philipp/git/photo-booth-new/node_modules/printer/lib" "--host=https://github.com/tojocky/node-printer/releases/download/" "--remote_path=0.4.0"
gyp ERR! cwd /Users/philipp/git/photo-booth-new/node_modules/printer
gyp ERR! node -v v12.1.0
gyp ERR! node-gyp -v v6.1.0
gyp ERR! not ok

Failed with exit code: 1

Error: gyp info it worked if it ends with ok
gyp info using node-gyp@6.1.0
gyp info using node@12.1.0 | darwin | x64
gyp info find Python using Python version 3.7.5 found at "/usr/local/opt/python/bin/python3.7"
gyp info spawn /usr/local/opt/python/bin/python3.7
gyp info spawn args [
gyp info spawn args   '/Users/philipp/git/photo-booth-new/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   '/Users/philipp/git/photo-booth-new/node_modules/printer/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/philipp/git/photo-booth-new/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/philipp/.electron-gyp/8.2.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=/Users/philipp/.electron-gyp/8.2.0',
gyp info spawn args   '-Dnode_gyp_dir=/Users/philipp/git/photo-booth-new/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/philipp/.electron-gyp/8.2.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/philipp/git/photo-booth-new/node_modules/printer',
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' ]
  CXX(target) Release/obj.target/node_printer/src/node_printer_posix.o
In file included from ../src/node_printer_posix.cc:1:
In file included from ../src/node_printer.hpp:4:
In file included from ../src/macros.hh:4:
In file included from ../../nan/nan.h:2884:
../../nan/nan_typedarray_contents.h:34:43: warning: 'GetContents' is deprecated: Use GetBackingStore. See http://crbug.com/v8/9908. [-Wdeprecated-declarations]
      data   = static_cast<char*>(buffer->GetContents().Data()) + byte_offset;
                                          ^
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:5163:3: note: 'GetContents' has been explicitly marked deprecated here
  V8_DEPRECATE_SOON("Use GetBackingStore. See http://crbug.com/v8/9908.")
  ^
/Users/philipp/.electron-gyp/8.2.0/include/node/v8config.h:409:41: note: expanded from macro 'V8_DEPRECATE_SOON'
#   define V8_DEPRECATE_SOON(message) [[deprecated(message)]]
                                        ^
../src/node_printer_posix.cc:76:9: error: no matching member function for call to 'Set'
        MY_NODE_SET_OBJECT_PROP(result_printer_job, "id", V8_VALUE_NEW(Number, job->id));
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:14:53: note: expanded from macro 'MY_NODE_SET_OBJECT_PROP'
#  define MY_NODE_SET_OBJECT_PROP(object, id, prop) MY_NODE_SET_OBJECT(object, V8_STRING_NEW_UTF8(id), prop)
                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:13:56: note: expanded from macro 'MY_NODE_SET_OBJECT'
#  define MY_NODE_SET_OBJECT(object, id, prop) object->Set(id, prop)
                                               ~~~~~~~~^~~
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3611:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3614:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/node_printer_posix.cc:77:9: error: no matching member function for call to 'Set'
        MY_NODE_SET_OBJECT_PROP(result_printer_job, "name", V8_STRING_NEW_UTF8(job->title));
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:14:53: note: expanded from macro 'MY_NODE_SET_OBJECT_PROP'
#  define MY_NODE_SET_OBJECT_PROP(object, id, prop) MY_NODE_SET_OBJECT(object, V8_STRING_NEW_UTF8(id), prop)
                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:13:56: note: expanded from macro 'MY_NODE_SET_OBJECT'
#  define MY_NODE_SET_OBJECT(object, id, prop) object->Set(id, prop)
                                               ~~~~~~~~^~~
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3611:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3614:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/node_printer_posix.cc:78:9: error: no matching member function for call to 'Set'
        MY_NODE_SET_OBJECT_PROP(result_printer_job, "printerName", V8_STRING_NEW_UTF8(job->dest));
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:14:53: note: expanded from macro 'MY_NODE_SET_OBJECT_PROP'
#  define MY_NODE_SET_OBJECT_PROP(object, id, prop) MY_NODE_SET_OBJECT(object, V8_STRING_NEW_UTF8(id), prop)
                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:13:56: note: expanded from macro 'MY_NODE_SET_OBJECT'
#  define MY_NODE_SET_OBJECT(object, id, prop) object->Set(id, prop)
                                               ~~~~~~~~^~~
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3611:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3614:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/node_printer_posix.cc:79:9: error: no matching member function for call to 'Set'
        MY_NODE_SET_OBJECT_PROP(result_printer_job, "user", V8_STRING_NEW_UTF8(job->user));
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:14:53: note: expanded from macro 'MY_NODE_SET_OBJECT_PROP'
#  define MY_NODE_SET_OBJECT_PROP(object, id, prop) MY_NODE_SET_OBJECT(object, V8_STRING_NEW_UTF8(id), prop)
                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:13:56: note: expanded from macro 'MY_NODE_SET_OBJECT'
#  define MY_NODE_SET_OBJECT(object, id, prop) object->Set(id, prop)
                                               ~~~~~~~~^~~
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3611:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3614:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/node_printer_posix.cc:92:9: error: no matching member function for call to 'Set'
        MY_NODE_SET_OBJECT_PROP(result_printer_job, "format", V8_STRING_NEW_UTF8(job_format.c_str()));
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:14:53: note: expanded from macro 'MY_NODE_SET_OBJECT_PROP'
#  define MY_NODE_SET_OBJECT_PROP(object, id, prop) MY_NODE_SET_OBJECT(object, V8_STRING_NEW_UTF8(id), prop)
                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:13:56: note: expanded from macro 'MY_NODE_SET_OBJECT'
#  define MY_NODE_SET_OBJECT(object, id, prop) object->Set(id, prop)
                                               ~~~~~~~~^~~
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3611:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3614:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/node_printer_posix.cc:93:9: error: no matching member function for call to 'Set'
        MY_NODE_SET_OBJECT_PROP(result_printer_job, "priority", V8_VALUE_NEW(Number, job->priority));
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:14:53: note: expanded from macro 'MY_NODE_SET_OBJECT_PROP'
#  define MY_NODE_SET_OBJECT_PROP(object, id, prop) MY_NODE_SET_OBJECT(object, V8_STRING_NEW_UTF8(id), prop)
                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:13:56: note: expanded from macro 'MY_NODE_SET_OBJECT'
#  define MY_NODE_SET_OBJECT(object, id, prop) object->Set(id, prop)
                                               ~~~~~~~~^~~
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3611:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3614:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/node_printer_posix.cc:94:9: error: no matching member function for call to 'Set'
        MY_NODE_SET_OBJECT_PROP(result_printer_job, "size", V8_VALUE_NEW(Number, job->size));
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:14:53: note: expanded from macro 'MY_NODE_SET_OBJECT_PROP'
#  define MY_NODE_SET_OBJECT_PROP(object, id, prop) MY_NODE_SET_OBJECT(object, V8_STRING_NEW_UTF8(id), prop)
                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:13:56: note: expanded from macro 'MY_NODE_SET_OBJECT'
#  define MY_NODE_SET_OBJECT(object, id, prop) object->Set(id, prop)
                                               ~~~~~~~~^~~
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3611:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3614:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/node_printer_posix.cc:101:17: error: no matching member function for call to 'Set'
                MY_NODE_SET_OBJECT(result_printer_job_status, i_status++, V8_STRING_NEW_UTF8(itStatus->first.c_str()));
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:13:56: note: expanded from macro 'MY_NODE_SET_OBJECT'
#  define MY_NODE_SET_OBJECT(object, id, prop) object->Set(id, prop)
                                               ~~~~~~~~^~~
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3611:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3614:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/node_printer_posix.cc:111:13: error: no matching member function for call to 'Set'
            MY_NODE_SET_OBJECT(result_printer_job_status, i_status++, V8_STRING_NEW_UTF8(s.str().c_str()));
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:13:56: note: expanded from macro 'MY_NODE_SET_OBJECT'
#  define MY_NODE_SET_OBJECT(object, id, prop) object->Set(id, prop)
                                               ~~~~~~~~^~~
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3611:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3614:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/node_printer_posix.cc:114:9: error: no matching member function for call to 'Set'
        MY_NODE_SET_OBJECT_PROP(result_printer_job, "status", result_printer_job_status);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:14:53: note: expanded from macro 'MY_NODE_SET_OBJECT_PROP'
#  define MY_NODE_SET_OBJECT_PROP(object, id, prop) MY_NODE_SET_OBJECT(object, V8_STRING_NEW_UTF8(id), prop)
                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:13:56: note: expanded from macro 'MY_NODE_SET_OBJECT'
#  define MY_NODE_SET_OBJECT(object, id, prop) object->Set(id, prop)
                                               ~~~~~~~~^~~
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3611:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3614:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/node_printer_posix.cc:123:9: error: no matching member function for call to 'Set'
        MY_NODE_SET_OBJECT_PROP(result_printer_job, "completedTime", Nan::New<v8::Date>(completedTime).ToLocalChecked());
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:14:53: note: expanded from macro 'MY_NODE_SET_OBJECT_PROP'
#  define MY_NODE_SET_OBJECT_PROP(object, id, prop) MY_NODE_SET_OBJECT(object, V8_STRING_NEW_UTF8(id), prop)
                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:13:56: note: expanded from macro 'MY_NODE_SET_OBJECT'
#  define MY_NODE_SET_OBJECT(object, id, prop) object->Set(id, prop)
                                               ~~~~~~~~^~~
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3611:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3614:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/node_printer_posix.cc:124:9: error: no matching member function for call to 'Set'
        MY_NODE_SET_OBJECT_PROP(result_printer_job, "creationTime", Nan::New<v8::Date>(creationTime).ToLocalChecked());
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:14:53: note: expanded from macro 'MY_NODE_SET_OBJECT_PROP'
#  define MY_NODE_SET_OBJECT_PROP(object, id, prop) MY_NODE_SET_OBJECT(object, V8_STRING_NEW_UTF8(id), prop)
                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:13:56: note: expanded from macro 'MY_NODE_SET_OBJECT'
#  define MY_NODE_SET_OBJECT(object, id, prop) object->Set(id, prop)
                                               ~~~~~~~~^~~
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3611:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3614:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/node_printer_posix.cc:125:9: error: no matching member function for call to 'Set'
        MY_NODE_SET_OBJECT_PROP(result_printer_job, "processingTime", Nan::New<v8::Date>(processingTime).ToLocalChecked());
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:14:53: note: expanded from macro 'MY_NODE_SET_OBJECT_PROP'
#  define MY_NODE_SET_OBJECT_PROP(object, id, prop) MY_NODE_SET_OBJECT(object, V8_STRING_NEW_UTF8(id), prop)
                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:13:56: note: expanded from macro 'MY_NODE_SET_OBJECT'
#  define MY_NODE_SET_OBJECT(object, id, prop) object->Set(id, prop)
                                               ~~~~~~~~^~~
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3611:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3614:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/node_printer_posix.cc:148:17: error: no matching member function for call to 'Set'
                MY_NODE_SET_OBJECT_PROP(ppd_suboptions, choice->choice, V8_VALUE_NEW(Boolean, static_cast<bool>(choice->marked)));
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:14:53: note: expanded from macro 'MY_NODE_SET_OBJECT_PROP'
#  define MY_NODE_SET_OBJECT_PROP(object, id, prop) MY_NODE_SET_OBJECT(object, V8_STRING_NEW_UTF8(id), prop)
                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:13:56: note: expanded from macro 'MY_NODE_SET_OBJECT'
#  define MY_NODE_SET_OBJECT(object, id, prop) object->Set(id, prop)
                                               ~~~~~~~~^~~
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3611:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3614:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/node_printer_posix.cc:151:13: error: no matching member function for call to 'Set'
            MY_NODE_SET_OBJECT_PROP(ppd_options, option->keyword, ppd_suboptions);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:14:53: note: expanded from macro 'MY_NODE_SET_OBJECT_PROP'
#  define MY_NODE_SET_OBJECT_PROP(object, id, prop) MY_NODE_SET_OBJECT(object, V8_STRING_NEW_UTF8(id), prop)
                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:13:56: note: expanded from macro 'MY_NODE_SET_OBJECT'
#  define MY_NODE_SET_OBJECT(object, id, prop) object->Set(id, prop)
                                               ~~~~~~~~^~~
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3611:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3614:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/node_printer_posix.cc:205:9: error: no matching member function for call to 'Set'
        MY_NODE_SET_OBJECT_PROP(result_printer, "name", V8_STRING_NEW_UTF8(printer->name));
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:14:53: note: expanded from macro 'MY_NODE_SET_OBJECT_PROP'
#  define MY_NODE_SET_OBJECT_PROP(object, id, prop) MY_NODE_SET_OBJECT(object, V8_STRING_NEW_UTF8(id), prop)
                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:13:56: note: expanded from macro 'MY_NODE_SET_OBJECT'
#  define MY_NODE_SET_OBJECT(object, id, prop) object->Set(id, prop)
                                               ~~~~~~~~^~~
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3611:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3614:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/node_printer_posix.cc:206:9: error: no matching member function for call to 'Set'
        MY_NODE_SET_OBJECT_PROP(result_printer, "isDefault", V8_VALUE_NEW(Boolean, static_cast<bool>(printer->is_default)));
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:14:53: note: expanded from macro 'MY_NODE_SET_OBJECT_PROP'
#  define MY_NODE_SET_OBJECT_PROP(object, id, prop) MY_NODE_SET_OBJECT(object, V8_STRING_NEW_UTF8(id), prop)
                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:13:56: note: expanded from macro 'MY_NODE_SET_OBJECT'
#  define MY_NODE_SET_OBJECT(object, id, prop) object->Set(id, prop)
                                               ~~~~~~~~^~~
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3611:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3614:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/node_printer_posix.cc:210:13: error: no matching member function for call to 'Set'
            MY_NODE_SET_OBJECT_PROP(result_printer, "instance", V8_STRING_NEW_UTF8(printer->instance));
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:14:53: note: expanded from macro 'MY_NODE_SET_OBJECT_PROP'
#  define MY_NODE_SET_OBJECT_PROP(object, id, prop) MY_NODE_SET_OBJECT(object, V8_STRING_NEW_UTF8(id), prop)
                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:13:56: note: expanded from macro 'MY_NODE_SET_OBJECT'
#  define MY_NODE_SET_OBJECT(object, id, prop) object->Set(id, prop)
                                               ~~~~~~~~^~~
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3611:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3614:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/node_printer_posix.cc:218:13: error: no matching member function for call to 'Set'
            MY_NODE_SET_OBJECT_PROP(result_printer_options, dest_option->name, V8_STRING_NEW_UTF8(dest_option->value));
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:14:53: note: expanded from macro 'MY_NODE_SET_OBJECT_PROP'
#  define MY_NODE_SET_OBJECT_PROP(object, id, prop) MY_NODE_SET_OBJECT(object, V8_STRING_NEW_UTF8(id), prop)
                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hh:13:56: note: expanded from macro 'MY_NODE_SET_OBJECT'
#  define MY_NODE_SET_OBJECT(object, id, prop) object->Set(id, prop)
                                               ~~~~~~~~^~~
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3611:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/philipp/.electron-gyp/8.2.0/include/node/v8.h:3614:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
1 warning and 20 errors generated.
make: *** [Release/obj.target/node_printer/src/node_printer_posix.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/philipp/git/photo-booth-new/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:196:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:256:12)
gyp ERR! System Darwin 19.4.0
gyp ERR! command "/usr/local/Cellar/node/12.1.0/bin/node" "/Users/philipp/git/photo-booth-new/node_modules/electron-rebuild/node_modules/.bin/node-gyp" "rebuild" "--target=8.2.0" "--arch=x64" "--dist-url=https://www.electronjs.org/headers" "--build-from-source" "--module_name=node_printer" "--module_path=/Users/philipp/git/photo-booth-new/node_modules/printer/lib" "--host=https://github.com/tojocky/node-printer/releases/download/" "--remote_path=0.4.0"
gyp ERR! cwd /Users/philipp/git/photo-booth-new/node_modules/printer
gyp ERR! node -v v12.1.0
gyp ERR! node-gyp -v v6.1.0
gyp ERR! not ok

Failed with exit code: 1
    at SafeSubscriber._error (/Users/philipp/git/photo-booth-new/node_modules/spawn-rx/lib/src/index.js:267:84)
    at SafeSubscriber.__tryOrUnsub (/Users/philipp/git/photo-booth-new/node_modules/rxjs/internal/Subscriber.js:205:16)
    at SafeSubscriber.error (/Users/philipp/git/photo-booth-new/node_modules/rxjs/internal/Subscriber.js:156:26)
    at Subscriber._error (/Users/philipp/git/photo-booth-new/node_modules/rxjs/internal/Subscriber.js:92:26)
    at Subscriber.error (/Users/philipp/git/photo-booth-new/node_modules/rxjs/internal/Subscriber.js:72:18)
    at MapSubscriber.Subscriber._error (/Users/philipp/git/photo-booth-new/node_modules/rxjs/internal/Subscriber.js:92:26)
    at MapSubscriber.Subscriber.error (/Users/philipp/git/photo-booth-new/node_modules/rxjs/internal/Subscriber.js:72:18)
    at SafeSubscriber._next (/Users/philipp/git/photo-booth-new/node_modules/spawn-rx/lib/src/index.js:242:65)
    at SafeSubscriber.__tryOrUnsub (/Users/philipp/git/photo-booth-new/node_modules/rxjs/internal/Subscriber.js:205:16)
    at SafeSubscriber.next (/Users/philipp/git/photo-booth-new/node_modules/rxjs/internal/Subscriber.js:143:22)
error Command failed with exit code 255.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

I'm not really sure what I'm doing and I also had not yet the chance to test it, but by changing line 7 in src/macro.hh from

#if NODE_VERSION_AT_LEAST(13, 0, 0)

to

#if NODE_VERSION_AT_LEAST(12, 0, 0)

it builds fine.

Any suggestions?

dhenson02 commented 4 years ago

Bump - I have this problem too and if that is all it takes to fix, @philipptrenz could you submit a PR with that change?

philipptrenz commented 4 years ago

I had no chance to test if it has any runtime issues, I can only say that it compiles. I'm also not sure if there are any other side effects

dhenson02 commented 4 years ago

Well I'm also able to get it compiled on 12.13.0 but I don't have a printer and the package doesn't show any in the getPrinters() list so...100% working fine :grin:

goooseman commented 4 years ago

I've faced the same issue too with Electron v7 and Electron v8.

This change solves the issue with Electron v8 (node 12.13.0).

I was sure that it will break compatibility with Electron v6 (node 12.4.0), but it does not change it.

For those, who want a quick fix:

  1. Install patch-package and configure postinstall
  2. Add patches/printer+0.4.0.patch:
diff --git a/node_modules/printer/src/macros.hh b/node_modules/printer/src/macros.hh
index 1ae5c0c..cd082c8 100644
--- a/node_modules/printer/src/macros.hh
+++ b/node_modules/printer/src/macros.hh
@@ -4,7 +4,7 @@
 #include <nan.h>
 #include <node_version.h>

-#if NODE_VERSION_AT_LEAST(13, 0, 0)
+#if NODE_VERSION_AT_LEAST(12, 0, 0)
 #  define MY_NODE_GET_OBJECT(object, id) object->Get(v8::Isolate::GetCurrent()->GetCurrentContext(), id).ToLocalChecked()
 #  define MY_NODE_SET_OBJECT(object, id, prop) object->Set(v8::Isolate::GetCurrent()->GetCurrentContext(), id, prop)
 #  define MY_NODE_SET_OBJECT_PROP(object, id, prop) MY_NODE_SET_OBJECT(object, V8_STRING_NEW_UTF8(id), prop)
  1. Run npm install again
  2. PROFIT!11

About the test with the real printer: I can do it tomorrow. If everything works and I will be able to get printer details and print a photo, I will do a PR to this project.

goooseman commented 4 years ago

I confirm that it change works on Mac OS 10.13 and Lubuntu 18.04 in an Electron v8.2.5 application to list printers and print a photo.

Of course, I can create a PR, but I'm unsure about this change. I'm not sure how it can affect users of the lib on different environments and NodeJS versions.

goooseman commented 4 years ago

The PR is created

dhenson02 commented 4 years ago

Awesome :)

theshekhawat commented 3 years ago

The PR is created

I do not see the change that is supposed to change after PR. is it done ?

image

goooseman commented 3 years ago

Yep, it is done.

#if NODE_VERSION_AT_LEAST(13, 0, 0) has been replaced with #if NODE_VERSION_AT_LEAST(12, 0, 0) on line number 7.