node-printer icon indicating copy to clipboard operation
node-printer copied to clipboard

Will not install on node 12.5.0

Open Hyperblaster opened this issue 5 years ago • 6 comments

Pretty ugly errors on every version of node i've tried (8+)

Not quite sure what to do as i've gone through all the of the usual, Uninstalling rebuilding, compiling etc.

Does this package only work on a specific node version?

` user$ npm install printer

[email protected] install /Users/user/Sites/temp/node_modules/printer node-gyp rebuild

CXX(target) Release/obj.target/node_printer/src/node_printer_posix.o In file included from ../src/node_printer_posix.cc:1: ../src/node_printer.hpp:121:39: error: no member named 'Handle' in namespace 'v8' bool getStringOrBufferFromV8Value(v8::Handlev8::Value iV8Value, std::string &oData); ~~~~^ ../src/node_printer.hpp:121:55: error: expected '(' for function-style cast or type construction bool getStringOrBufferFromV8Value(v8::Handlev8::Value iV8Value, std::string &oData); ~~~~~~~~~^ ../src/node_printer.hpp:121:57: error: use of undeclared identifier 'iV8Value' bool getStringOrBufferFromV8Value(v8::Handlev8::Value iV8Value, std::string &oData); ^ ../src/node_printer.hpp:121:79: error: expected '(' for function-style cast or type construction bool getStringOrBufferFromV8Value(v8::Handlev8::Value iV8Value, std::string &oData); ~~~~~~~~~~~ ^ ../src/node_printer.hpp:121:80: error: use of undeclared identifier 'oData' bool getStringOrBufferFromV8Value(v8::Handlev8::Value iV8Value, std::string &oData); ^ ../src/node_printer_posix.cc:70:59: error: no template named 'Handle' in namespace 'v8' std::string parseJobObject(const cups_job_t *job, v8::Handlev8::Object result_printer_job) ~~~~^ ../src/node_printer_posix.cc:74:33: warning: 'NewFromUtf8' is deprecated: Use maybe version [-Wdeprecated-declarations] result_printer_job->Set(V8_STRING_NEW_UTF8("id"), V8_VALUE_NEW(Number, job->id)); ^ ../src/macros.hh:18:51: note: expanded from macro 'V8_STRING_NEW_UTF8'

define V8_STRING_NEW_UTF8(value) v8::String::NewFromUtf8(MY_NODE_MODULE_ISOLATE_PRE value)

                                              ^

/Users/user/.node-gyp/12.5.0/include/node/v8.h:2890:10: note: 'NewFromUtf8' has been explicitly marked deprecated here static V8_DEPRECATED( ^ /Users/user/.node-gyp/12.5.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED' declarator attribute((deprecated(message))) ^ ../src/node_printer_posix.cc:75:33: warning: 'NewFromUtf8' is deprecated: Use maybe version [-Wdeprecated-declarations] result_printer_job->Set(V8_STRING_NEW_UTF8("name"), V8_STRING_NEW_UTF8(job->title)); ^ ../src/macros.hh:18:51: note: expanded from macro 'V8_STRING_NEW_UTF8'

define V8_STRING_NEW_UTF8(value) v8::String::NewFromUtf8(MY_NODE_MODULE_ISOLATE_PRE value)

                                              ^

/Users/user/.node-gyp/12.5.0/include/node/v8.h:2890:10: note: 'NewFromUtf8' has been explicitly marked deprecated here static V8_DEPRECATED( ^ /Users/user/.node-gyp/12.5.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED' declarator attribute((deprecated(message))) ^ ../src/node_printer_posix.cc:75:61: warning: 'NewFromUtf8' is deprecated: Use maybe version [-Wdeprecated-declarations] result_printer_job->Set(V8_STRING_NEW_UTF8("name"), V8_STRING_NEW_UTF8(job->title)); ^ ../src/macros.hh:18:51: note: expanded from macro 'V8_STRING_NEW_UTF8'

define V8_STRING_NEW_UTF8(value) v8::String::NewFromUtf8(MY_NODE_MODULE_ISOLATE_PRE value)

                                              ^

/Users/user/.node-gyp/12.5.0/include/node/v8.h:2890:10: note: 'NewFromUtf8' has been explicitly marked deprecated here static V8_DEPRECATED( ^ /Users/user/.node-gyp/12.5.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED' declarator attribute((deprecated(message))) ^ ../src/node_printer_posix.cc:76:33: warning: 'NewFromUtf8' is deprecated: Use maybe version [-Wdeprecated-declarations] result_printer_job->Set(V8_STRING_NEW_UTF8("printerName"), V8_STRING_NEW_UTF8(job->dest)); ^ ../src/macros.hh:18:51: note: expanded from macro 'V8_STRING_NEW_UTF8'

define V8_STRING_NEW_UTF8(value) v8::String::NewFromUtf8(MY_NODE_MODULE_ISOLATE_PRE value)

                                              ^

/Users/user/.node-gyp/12.5.0/include/node/v8.h:2890:10: note: 'NewFromUtf8' has been explicitly marked deprecated here static V8_DEPRECATED( ^ /Users/user/.node-gyp/12.5.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED' declarator attribute((deprecated(message))) ^ ../src/node_printer_posix.cc:76:68: warning: 'NewFromUtf8' is deprecated: Use maybe version [-Wdeprecated-declarations] result_printer_job->Set(V8_STRING_NEW_UTF8("printerName"), V8_STRING_NEW_UTF8(job->dest)); ^ ../src/macros.hh:18:51: note: expanded from macro 'V8_STRING_NEW_UTF8'

define V8_STRING_NEW_UTF8(value) v8::String::NewFromUtf8(MY_NODE_MODULE_ISOLATE_PRE value)

                                              ^

/Users/user/.node-gyp/12.5.0/include/node/v8.h:2890:10: note: 'NewFromUtf8' has been explicitly marked deprecated here static V8_DEPRECATED( ^ /Users/user/.node-gyp/12.5.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED' declarator attribute((deprecated(message))) ^ ../src/node_printer_posix.cc:77:33: warning: 'NewFromUtf8' is deprecated: Use maybe version [-Wdeprecated-declarations] result_printer_job->Set(V8_STRING_NEW_UTF8("user"), V8_STRING_NEW_UTF8(job->user)); ^ ../src/macros.hh:18:51: note: expanded from macro 'V8_STRING_NEW_UTF8'

define V8_STRING_NEW_UTF8(value) v8::String::NewFromUtf8(MY_NODE_MODULE_ISOLATE_PRE value)

                                              ^

/Users/user/.node-gyp/12.5.0/include/node/v8.h:2890:10: note: 'NewFromUtf8' has been explicitly marked deprecated here static V8_DEPRECATED( ^ /Users/user/.node-gyp/12.5.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED' declarator attribute((deprecated(message))) ^ ../src/node_printer_posix.cc:77:61: warning: 'NewFromUtf8' is deprecated: Use maybe version [-Wdeprecated-declarations] result_printer_job->Set(V8_STRING_NEW_UTF8("user"), V8_STRING_NEW_UTF8(job->user)); ^ ../src/macros.hh:18:51: note: expanded from macro 'V8_STRING_NEW_UTF8'

define V8_STRING_NEW_UTF8(value) v8::String::NewFromUtf8(MY_NODE_MODULE_ISOLATE_PRE value)

                                              ^

/Users/user/.node-gyp/12.5.0/include/node/v8.h:2890:10: note: 'NewFromUtf8' has been explicitly marked deprecated here static V8_DEPRECATED( ^ /Users/user/.node-gyp/12.5.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED' declarator attribute((deprecated(message))) ^ ../src/node_printer_posix.cc:90:33: warning: 'NewFromUtf8' is deprecated: Use maybe version [-Wdeprecated-declarations] result_printer_job->Set(V8_STRING_NEW_UTF8("format"), V8_STRING_NEW_UTF8(job_format.c_str())); ^ ../src/macros.hh:18:51: note: expanded from macro 'V8_STRING_NEW_UTF8'

define V8_STRING_NEW_UTF8(value) v8::String::NewFromUtf8(MY_NODE_MODULE_ISOLATE_PRE value)

                                              ^

/Users/user/.node-gyp/12.5.0/include/node/v8.h:2890:10: note: 'NewFromUtf8' has been explicitly marked deprecated here static V8_DEPRECATED( ^ /Users/user/.node-gyp/12.5.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED' declarator attribute((deprecated(message))) ^ ../src/node_printer_posix.cc:90:63: warning: 'NewFromUtf8' is deprecated: Use maybe version [-Wdeprecated-declarations] result_printer_job->Set(V8_STRING_NEW_UTF8("format"), V8_STRING_NEW_UTF8(job_format.c_str())); ^ ../src/macros.hh:18:51: note: expanded from macro 'V8_STRING_NEW_UTF8'

define V8_STRING_NEW_UTF8(value) v8::String::NewFromUtf8(MY_NODE_MODULE_ISOLATE_PRE value)

                                              ^

/Users/user/.node-gyp/12.5.0/include/node/v8.h:2890:10: note: 'NewFromUtf8' has been explicitly marked deprecated here static V8_DEPRECATED( ^ /Users/user/.node-gyp/12.5.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED' declarator attribute((deprecated(message))) ^ ../src/node_printer_posix.cc:91:33: warning: 'NewFromUtf8' is deprecated: Use maybe version [-Wdeprecated-declarations] result_printer_job->Set(V8_STRING_NEW_UTF8("priority"), V8_VALUE_NEW(Number, job->priority)); ^ ../src/macros.hh:18:51: note: expanded from macro 'V8_STRING_NEW_UTF8'

define V8_STRING_NEW_UTF8(value) v8::String::NewFromUtf8(MY_NODE_MODULE_ISOLATE_PRE value)

                                              ^

/Users/user/.node-gyp/12.5.0/include/node/v8.h:2890:10: note: 'NewFromUtf8' has been explicitly marked deprecated here static V8_DEPRECATED( ^ /Users/user/.node-gyp/12.5.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED' declarator attribute((deprecated(message))) ^ ../src/node_printer_posix.cc:92:33: warning: 'NewFromUtf8' is deprecated: Use maybe version [-Wdeprecated-declarations] result_printer_job->Set(V8_STRING_NEW_UTF8("size"), V8_VALUE_NEW(Number, job->size)); ^ ../src/macros.hh:18:51: note: expanded from macro 'V8_STRING_NEW_UTF8'

define V8_STRING_NEW_UTF8(value) v8::String::NewFromUtf8(MY_NODE_MODULE_ISOLATE_PRE value)

                                              ^

/Users/user/.node-gyp/12.5.0/include/node/v8.h:2890:10: note: 'NewFromUtf8' has been explicitly marked deprecated here static V8_DEPRECATED( ^ /Users/user/.node-gyp/12.5.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED' declarator attribute((deprecated(message))) ^ ../src/node_printer_posix.cc:99:60: warning: 'NewFromUtf8' is deprecated: Use maybe version [-Wdeprecated-declarations] result_printer_job_status->Set(i_status++, V8_STRING_NEW_UTF8(itStatus->first.c_str())); ^ ../src/macros.hh:18:51: note: expanded from macro 'V8_STRING_NEW_UTF8'

define V8_STRING_NEW_UTF8(value) v8::String::NewFromUtf8(MY_NODE_MODULE_ISOLATE_PRE value)

                                              ^

/Users/user/.node-gyp/12.5.0/include/node/v8.h:2890:10: note: 'NewFromUtf8' has been explicitly marked deprecated here static V8_DEPRECATED( ^ /Users/user/.node-gyp/12.5.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED' declarator attribute((deprecated(message))) ^ ../src/node_printer_posix.cc:99:44: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations] result_printer_job_status->Set(i_status++, V8_STRING_NEW_UTF8(itStatus->first.c_str())); ^ /Users/user/.node-gyp/12.5.0/include/node/v8.h:3367:3: note: 'Set' has been explicitly marked deprecated here V8_DEPRECATE_SOON("Use maybe version", ^ /Users/user/.node-gyp/12.5.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON' declarator attribute((deprecated(message))) ^ ../src/node_printer_posix.cc:109:56: warning: 'NewFromUtf8' is deprecated: Use maybe version [-Wdeprecated-declarations] result_printer_job_status->Set(i_status++, V8_STRING_NEW_UTF8(s.str().c_str())); ^ ../src/macros.hh:18:51: note: expanded from macro 'V8_STRING_NEW_UTF8'

define V8_STRING_NEW_UTF8(value) v8::String::NewFromUtf8(MY_NODE_MODULE_ISOLATE_PRE value)

                                              ^

/Users/user/.node-gyp/12.5.0/include/node/v8.h:2890:10: note: 'NewFromUtf8' has been explicitly marked deprecated here static V8_DEPRECATED( ^ /Users/user/.node-gyp/12.5.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED' declarator attribute((deprecated(message))) ^ ../src/node_printer_posix.cc:109:40: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations] result_printer_job_status->Set(i_status++, V8_STRING_NEW_UTF8(s.str().c_str())); ^ /Users/user/.node-gyp/12.5.0/include/node/v8.h:3367:3: note: 'Set' has been explicitly marked deprecated here V8_DEPRECATE_SOON("Use maybe version", ^ /Users/user/.node-gyp/12.5.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON' declarator attribute((deprecated(message))) ^ ../src/node_printer_posix.cc:112:33: warning: 'NewFromUtf8' is deprecated: Use maybe version [-Wdeprecated-declarations] result_printer_job->Set(V8_STRING_NEW_UTF8("status"), result_printer_job_status); ^ ../src/macros.hh:18:51: note: expanded from macro 'V8_STRING_NEW_UTF8'

define V8_STRING_NEW_UTF8(value) v8::String::NewFromUtf8(MY_NODE_MODULE_ISOLATE_PRE value)

                                              ^

/Users/user/.node-gyp/12.5.0/include/node/v8.h:2890:10: note: 'NewFromUtf8' has been explicitly marked deprecated here static V8_DEPRECATED( ^ /Users/user/.node-gyp/12.5.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED' declarator attribute((deprecated(message))) ^ ../src/node_printer_posix.cc:116:33: warning: 'NewFromUtf8' is deprecated: Use maybe version [-Wdeprecated-declarations] result_printer_job->Set(V8_STRING_NEW_UTF8("completedTime"), V8_VALUE_NEW(Date, job->completed_time*1000)); ^ ../src/macros.hh:18:51: note: expanded from macro 'V8_STRING_NEW_UTF8'

define V8_STRING_NEW_UTF8(value) v8::String::NewFromUtf8(MY_NODE_MODULE_ISOLATE_PRE value)

                                              ^

/Users/user/.node-gyp/12.5.0/include/node/v8.h:2890:10: note: 'NewFromUtf8' has been explicitly marked deprecated here static V8_DEPRECATED( ^ /Users/user/.node-gyp/12.5.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED' declarator attribute((deprecated(message))) ^ ../src/node_printer_posix.cc:116:70: error: no viable conversion from 'v8::Isolate ' to 'Localv8::Context' result_printer_job->Set(V8_STRING_NEW_UTF8("completedTime"), V8_VALUE_NEW(Date, job->completed_time1000)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/macros.hh:16:53: note: expanded from macro 'V8_VALUE_NEW'

define V8_VALUE_NEW(type, value) v8::type::New(MY_NODE_MODULE_ISOLATE_PRE value)

                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~

../src/macros.hh:12:39: note: expanded from macro 'MY_NODE_MODULE_ISOLATE_PRE'

define MY_NODE_MODULE_ISOLATE_PRE isolate,

                                  ^~~~~~~

/Users/user/.node-gyp/12.5.0/include/node/v8.h:183:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'v8::Isolate *' to 'const v8::Localv8::Context &' for 1st argument class Local { ^ /Users/user/.node-gyp/12.5.0/include/node/v8.h:183:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'v8::Isolate *' to 'v8::Localv8::Context &&' for 1st argument /Users/user/.node-gyp/12.5.0/include/node/v8.h:187:13: note: candidate template ignored: could not match 'Local' against 'v8::Isolate ' V8_INLINE Local(Local<S> that) ^ /Users/user/.node-gyp/12.5.0/include/node/v8.h:5282:69: note: passing argument to parameter 'context' here static V8_WARN_UNUSED_RESULT MaybeLocal<Value> New(Local<Context> context, ^ ../src/node_printer_posix.cc:117:33: warning: 'NewFromUtf8' is deprecated: Use maybe version [-Wdeprecated-declarations] result_printer_job->Set(V8_STRING_NEW_UTF8("creationTime"), V8_VALUE_NEW(Date, job->creation_time1000)); ^ ../src/macros.hh:18:51: note: expanded from macro 'V8_STRING_NEW_UTF8'

define V8_STRING_NEW_UTF8(value) v8::String::NewFromUtf8(MY_NODE_MODULE_ISOLATE_PRE value)

                                              ^

/Users/user/.node-gyp/12.5.0/include/node/v8.h:2890:10: note: 'NewFromUtf8' has been explicitly marked deprecated here static V8_DEPRECATED( ^ /Users/user/.node-gyp/12.5.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED' declarator attribute((deprecated(message))) ^ ../src/node_printer_posix.cc:117:69: error: no viable conversion from 'v8::Isolate ' to 'Localv8::Context' result_printer_job->Set(V8_STRING_NEW_UTF8("creationTime"), V8_VALUE_NEW(Date, job->creation_time1000)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/macros.hh:16:53: note: expanded from macro 'V8_VALUE_NEW'

define V8_VALUE_NEW(type, value) v8::type::New(MY_NODE_MODULE_ISOLATE_PRE value)

                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~

../src/macros.hh:12:39: note: expanded from macro 'MY_NODE_MODULE_ISOLATE_PRE'

define MY_NODE_MODULE_ISOLATE_PRE isolate,

                                  ^~~~~~~

/Users/user/.node-gyp/12.5.0/include/node/v8.h:183:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'v8::Isolate *' to 'const v8::Localv8::Context &' for 1st argument class Local { ^ /Users/user/.node-gyp/12.5.0/include/node/v8.h:183:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'v8::Isolate *' to 'v8::Localv8::Context &&' for 1st argument /Users/user/.node-gyp/12.5.0/include/node/v8.h:187:13: note: candidate template ignored: could not match 'Local' against 'v8::Isolate ' V8_INLINE Local(Local<S> that) ^ /Users/user/.node-gyp/12.5.0/include/node/v8.h:5282:69: note: passing argument to parameter 'context' here static V8_WARN_UNUSED_RESULT MaybeLocal<Value> New(Local<Context> context, ^ ../src/node_printer_posix.cc:118:33: warning: 'NewFromUtf8' is deprecated: Use maybe version [-Wdeprecated-declarations] result_printer_job->Set(V8_STRING_NEW_UTF8("processingTime"), V8_VALUE_NEW(Date, job->processing_time1000)); ^ ../src/macros.hh:18:51: note: expanded from macro 'V8_STRING_NEW_UTF8'

define V8_STRING_NEW_UTF8(value) v8::String::NewFromUtf8(MY_NODE_MODULE_ISOLATE_PRE value)

                                              ^

/Users/user/.node-gyp/12.5.0/include/node/v8.h:2890:10: note: 'NewFromUtf8' has been explicitly marked deprecated here static V8_DEPRECATED( ^ /Users/user/.node-gyp/12.5.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED' declarator attribute((deprecated(message))) ^ ../src/node_printer_posix.cc:118:71: error: no viable conversion from 'v8::Isolate ' to 'Localv8::Context' result_printer_job->Set(V8_STRING_NEW_UTF8("processingTime"), V8_VALUE_NEW(Date, job->processing_time1000)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/macros.hh:16:53: note: expanded from macro 'V8_VALUE_NEW'

define V8_VALUE_NEW(type, value) v8::type::New(MY_NODE_MODULE_ISOLATE_PRE value)

                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~

../src/macros.hh:12:39: note: expanded from macro 'MY_NODE_MODULE_ISOLATE_PRE'

define MY_NODE_MODULE_ISOLATE_PRE isolate,

                                  ^~~~~~~

/Users/user/.node-gyp/12.5.0/include/node/v8.h:183:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'v8::Isolate *' to 'const v8::Localv8::Context &' for 1st argument class Local { ^ /Users/user/.node-gyp/12.5.0/include/node/v8.h:183:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'v8::Isolate *' to 'v8::Localv8::Context &&' for 1st argument /Users/user/.node-gyp/12.5.0/include/node/v8.h:187:13: note: candidate template ignored: could not match 'Local' against 'v8::Isolate *' V8_INLINE Local(Local<S> that) ^ /Users/user/.node-gyp/12.5.0/include/node/v8.h:5282:69: note: passing argument to parameter 'context' here static V8_WARN_UNUSED_RESULT MaybeLocal<Value> New(Local<Context> context, ^ ../src/node_printer_posix.cc:126:10: error: variable has incomplete type 'void' void populatePpdOptions(v8::Handlev8::Object ppd_options, ppd_file_t *ppd, ppd_group_t *group) ^ ../src/node_printer_posix.cc:126:33: error: no member named 'Handle' in namespace 'v8' void populatePpdOptions(v8::Handlev8::Object ppd_options, ppd_file_t *ppd, ppd_group_t *group) ~~~~^ ../src/node_printer_posix.cc:126:50: error: expected '(' for function-style cast or type construction void populatePpdOptions(v8::Handlev8::Object ppd_options, ppd_file_t *ppd, ppd_group_t *group) ~~~~~~~~~~^ ../src/node_printer_posix.cc:126:52: error: use of undeclared identifier 'ppd_options' void populatePpdOptions(v8::Handlev8::Object ppd_options, ppd_file_t *ppd, ppd_group_t *group) ^ ../src/node_printer_posix.cc:126:65: error: unexpected type name 'ppd_file_t': expected expression void populatePpdOptions(v8::Handlev8::Object ppd_options, ppd_file_t *ppd, ppd_group_t *group) ^ ../src/node_printer_posix.cc:126:78: error: use of undeclared identifier 'ppd' void populatePpdOptions(v8::Handlev8::Object ppd_options, ppd_file_t *ppd, ppd_group_t *group) ^ ../src/node_printer_posix.cc:126:83: error: unexpected type name 'ppd_group_t': expected expression void populatePpdOptions(v8::Handlev8::Object ppd_options, ppd_file_t *ppd, ppd_group_t *group) ^ ../src/node_printer_posix.cc:126:96: error: use of undeclared identifier 'group' void populatePpdOptions(v8::Handlev8::Object ppd_options, ppd_file_t *ppd, ppd_group_t *group) ^ ../src/node_printer_posix.cc:126:102: error: expected ';' after top level declarator void populatePpdOptions(v8::Handlev8::Object ppd_options, ppd_file_t *ppd, ppd_group_t *group) ^ ; ../src/node_printer_posix.cc:284:21: error: use of undeclared identifier 'parsePrinterInfo' error_str = parsePrinterInfo(printer, result_printer); ^ ../src/node_printer_posix.cc:290:17: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations] result->Set(i, result_printer); ^ /Users/user/.node-gyp/12.5.0/include/node/v8.h:3367:3: note: 'Set' has been explicitly marked deprecated here V8_DEPRECATE_SOON("Use maybe version", ^ /Users/user/.node-gyp/12.5.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON' declarator attribute((deprecated(message))) ^ ../src/node_printer_posix.cc:296:9: warning: 'NewFromUtf8' is deprecated: Use maybe version [-Wdeprecated-declarations] RETURN_EXCEPTION_STR(error_str.c_str()); ^ ../src/macros.hh:24:54: note: expanded from macro 'RETURN_EXCEPTION_STR'

define RETURN_EXCEPTION_STR(msg) RETURN_EXCEPTION(V8_STRING_NEW_UTF8(msg))

                                                 ^

../src/macros.hh:18:51: note: expanded from macro 'V8_STRING_NEW_UTF8'

define V8_STRING_NEW_UTF8(value) v8::String::NewFromUtf8(MY_NODE_MODULE_ISOLATE_PRE value)

                                              ^

/Users/user/.node-gyp/12.5.0/include/node/v8.h:2890:10: note: 'NewFromUtf8' has been explicitly marked deprecated here static V8_DEPRECATED( ^ /Users/user/.node-gyp/12.5.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED' declarator attribute((deprecated(message))) ^ ../src/node_printer_posix.cc:320:5: warning: 'NewFromUtf8' is deprecated: Use maybe version [-Wdeprecated-declarations] REQUIRE_ARGUMENTS(iArgs, 1); ^ ../src/macros.hh:61:8: note: expanded from macro 'REQUIRE_ARGUMENTS' RETURN_EXCEPTION_STR("Expected " #n " arguments");
^ ../src/macros.hh:24:54: note: expanded from macro 'RETURN_EXCEPTION_STR'

define RETURN_EXCEPTION_STR(msg) RETURN_EXCEPTION(V8_STRING_NEW_UTF8(msg))

                                                 ^

../src/macros.hh:18:51: note: expanded from macro 'V8_STRING_NEW_UTF8'

define V8_STRING_NEW_UTF8(value) v8::String::NewFromUtf8(MY_NODE_MODULE_ISOLATE_PRE value)

                                              ^

/Users/user/.node-gyp/12.5.0/include/node/v8.h:2890:10: note: 'NewFromUtf8' has been explicitly marked deprecated here static V8_DEPRECATED( ^ /Users/user/.node-gyp/12.5.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED' declarator attribute((deprecated(message))) ^ ../src/node_printer_posix.cc:321:5: warning: 'NewFromUtf8' is deprecated: Use maybe version [-Wdeprecated-declarations] REQUIRE_ARGUMENT_STRING(iArgs, 0, printername); ^ ../src/macros.hh:91:5: note: expanded from macro 'REQUIRE_ARGUMENT_STRING' ARG_CHECK_STRING(args, i);
^ ../src/macros.hh:87:9: note: expanded from macro 'ARG_CHECK_STRING' RETURN_EXCEPTION_STR("Argument " #i " must be a string");
^ ../src/macros.hh:24:54: note: expanded from macro 'RETURN_EXCEPTION_STR'

define RETURN_EXCEPTION_STR(msg) RETURN_EXCEPTION(V8_STRING_NEW_UTF8(msg))

                                                 ^

../src/macros.hh:18:51: note: expanded from macro 'V8_STRING_NEW_UTF8'

define V8_STRING_NEW_UTF8(value) v8::String::NewFromUtf8(MY_NODE_MODULE_ISOLATE_PRE value)

                                              ^

/Users/user/.node-gyp/12.5.0/include/node/v8.h:2890:10: note: 'NewFromUtf8' has been explicitly marked deprecated here static V8_DEPRECATED( ^ /Users/user/.node-gyp/12.5.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED' declarator attribute((deprecated(message))) ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 23 warnings 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/user/.nvm/versions/node/v12.5.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23) gyp ERR! stack at ChildProcess.emit (events.js:200:13) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12) gyp ERR! System Darwin 18.6.0 gyp ERR! command "/Users/user/.nvm/versions/node/v12.5.0/bin/node" "/Users/user/.nvm/versions/node/v12.5.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /Users/user/Sites/temp/node_modules/printer gyp ERR! node -v v12.5.0 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok npm WARN [email protected] No description npm WARN [email protected] No repository field.

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. `

Hyperblaster avatar Jun 28 '19 04:06 Hyperblaster

@Hyperblaster had the same issues but gave up trying to make it work. take a look at https://github.com/artiebits/pdf-to-printer

artiebits avatar Aug 09 '19 09:08 artiebits

I think there is a PR for this but it seems there is a conflict with supporting very old node versions like 0.10 https://github.com/tojocky/node-printer/pull/253

douira avatar Aug 14 '19 13:08 douira

@douira we're currently on Node 11.13.0 I might try manually applying the change

Hyperblaster avatar Aug 19 '19 04:08 Hyperblaster

Try to edit the files that contains v8::Handle and replace it with v8::Local

Read this https://electronjs.org/blog/nodejs-native-addons-and-electron-5

rurigk avatar Aug 23 '19 16:08 rurigk

@douira we're currently on Node 11.13.0 I might try manually applying the change

Any updates on this? I'm about to try manually updating it myself, but this is an environment I am not familiar with at all so I'd prefer not to reinvent the wheel over here.

mathaou avatar Jan 14 '20 15:01 mathaou

If anyone is interested, I'm not using this package anymore and instead I interface with CUPS through the CLI commands. They are pretty well (not perfectly, I had to look for some of the undocumented printing options) documented and work just fine for me. https://www.cups.org/doc/options.html

douira avatar Jan 14 '20 19:01 douira