Automattic / node-canvas

Node canvas is a Cairo backed Canvas implementation for NodeJS.
10.11k stars 1.16k forks source link

canvas@1,6 installtion fails on ubuntu #1983

Closed WilliLam closed 2 years ago

WilliLam commented 2 years ago

Issue or Feature

Steps to Reproduce

npm install canvas@1.6

I've installed cairo/dependencies as mentioned using sudo apt-get install libcairo2-dev libjpeg-dev libpango1.0-dev libgif-dev build-essential g++

Installation log: willilam@willilam-Novatech:~/current_conventions_model/simulations/P3$ npm install canvas@1.6 > debug1.txt
npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I'll try to do my best with it! In file included from ../src/Canvas.cc:20: ../src/JPEGStream.h: In function ‘boolean empty_closure_output_buffer(j_compress_ptr)’: ../src/JPEGStream.h:42:108: warning: ‘v8::Local Nan::MakeCallback(v8::Local, v8::Local, int, v8::Local)’ is deprecated [-Wdeprecated-declarations] 42 | Nan::MakeCallback(Nan::GetCurrentContext()->Global(), (v8::Local)dest->closure->fn, 2, argv); | ^ In file included from ../src/Canvas.h:22, from ../src/Canvas.cc:7: ../../nan/nan.h:1028:46: note: declared here 1028 | NAN_DEPRECATED inline v8::Local MakeCallback( | ^~~~ In file included from ../src/Canvas.cc:20: ../src/JPEGStream.h:42:108: warning: ‘v8::Local Nan::MakeCallback(v8::Local, v8::Local, int, v8::Local)’ is deprecated [-Wdeprecated-declarations] 42 | Nan::MakeCallback(Nan::GetCurrentContext()->Global(), (v8::Local)dest->closure->fn, 2, argv); | ^ In file included from ../src/Canvas.h:22, from ../src/Canvas.cc:7: ../../nan/nan.h:1028:46: note: declared here 1028 | NAN_DEPRECATED inline v8::Local MakeCallback( | ^~~~ In file included from ../src/Canvas.cc:20: ../src/JPEGStream.h: In function ‘void term_closure_destination(j_compress_ptr)’: ../src/JPEGStream.h:63:113: warning: ‘v8::Local Nan::MakeCallback(v8::Local, v8::Local, int, v8::Local)’ is deprecated [-Wdeprecated-declarations] 63 | Nan::MakeCallback(Nan::GetCurrentContext()->Global(), (v8::Local)dest->closure->fn, 2, data_argv); | ^ In file included from ../src/Canvas.h:22, from ../src/Canvas.cc:7: ../../nan/nan.h:1028:46: note: declared here 1028 | NAN_DEPRECATED inline v8::Local MakeCallback( | ^~~~ In file included from ../src/Canvas.cc:20: ../src/JPEGStream.h:63:113: warning: ‘v8::Local Nan::MakeCallback(v8::Local, v8::Local, int, v8::Local)’ is deprecated [-Wdeprecated-declarations] 63 | Nan::MakeCallback(Nan::GetCurrentContext()->Global(), (v8::Local)dest->closure->fn, 2, data_argv); | ^ In file included from ../src/Canvas.h:22, from ../src/Canvas.cc:7: ../../nan/nan.h:1028:46: note: declared here 1028 | NAN_DEPRECATED inline v8::Local MakeCallback( | ^~~~ In file included from ../src/Canvas.cc:20: ../src/JPEGStream.h:71:112: warning: ‘v8::Local Nan::MakeCallback(v8::Local, v8::Local, int, v8::Local)’ is deprecated [-Wdeprecated-declarations] 71 | Nan::MakeCallback(Nan::GetCurrentContext()->Global(), (v8::Local)dest->closure->fn, 2, end_argv); | ^ In file included from ../src/Canvas.h:22, from ../src/Canvas.cc:7: ../../nan/nan.h:1028:46: note: declared here 1028 | NAN_DEPRECATED inline v8::Local MakeCallback( | ^~~~ In file included from ../src/Canvas.cc:20: ../src/JPEGStream.h:71:112: warning: ‘v8::Local Nan::MakeCallback(v8::Local, v8::Local, int, v8::Local)’ is deprecated [-Wdeprecated-declarations] 71 | Nan::MakeCallback(Nan::GetCurrentContext()->Global(), (v8::Local)dest->closure->fn, 2, end_argv); | ^ In file included from ../src/Canvas.h:22, from ../src/Canvas.cc:7: ../../nan/nan.h:1028:46: note: declared here 1028 | NAN_DEPRECATED inline v8::Local MakeCallback( | ^~~~ ../src/Canvas.cc: In static member function ‘static void Canvas::Initialize(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’: ../src/Canvas.cc:60:75: error: no matching function for call to ‘v8::FunctionTemplate::GetFunction()’ 60 | Nan::Set(target, Nan::New("Canvas").ToLocalChecked(), ctor->GetFunction()); | ^ In file included from ../src/Canvas.h:11, from ../src/Canvas.cc:7: /home/willilam/.cache/node-gyp/12.16.2/include/node/v8.h:6126:46: note: candidate: ‘v8::MaybeLocal v8::FunctionTemplate::GetFunction(v8::Local)’ 6126 | V8_WARN_UNUSED_RESULT MaybeLocal GetFunction( | ^~~ /home/willilam/.cache/node-gyp/12.16.2/include/node/v8.h:6126:46: note: candidate expects 1 argument, 0 provided ../src/Canvas.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE Canvas::New(Nan::NAN_METHOD_ARGS_TYPE)’: ../src/Canvas.cc:74:57: error: no matching function for call to ‘v8::Value::Uint32Value()’ 74 | if (info[0]->IsNumber()) width = info[0]->Uint32Value(); | ^ In file included from ../src/Canvas.h:11, from ../src/Canvas.cc:7: /home/willilam/.cache/node-gyp/12.16.2/include/node/v8.h:2707:41: note: candidate: ‘v8::Maybe v8::Value::Uint32Value(v8::Local) const’ 2707 | V8_WARN_UNUSED_RESULT Maybe Uint32Value( | ^~~ /home/willilam/.cache/node-gyp/12.16.2/include/node/v8.h:2707:41: note: candidate expects 1 argument, 0 provided ../src/Canvas.cc:75:58: error: no matching function for call to ‘v8::Value::Uint32Value()’ 75 | if (info[1]->IsNumber()) height = info[1]->Uint32Value(); | ^ In file included from ../src/Canvas.h:11, from ../src/Canvas.cc:7: /home/willilam/.cache/node-gyp/12.16.2/include/node/v8.h:2707:41: note: candidate: ‘v8::Maybe v8::Value::Uint32Value(v8::Local) const’ 2707 | V8_WARN_UNUSED_RESULT Maybe Uint32Value( | ^~~ /home/willilam/.cache/node-gyp/12.16.2/include/node/v8.h:2707:41: note: candidate expects 1 argument, 0 provided ../src/Canvas.cc:76:76: error: no matching function for call to ‘v8::String::Utf8Value::Utf8Value(v8::Local)’ 76 | if (info[2]->IsString()) type = !strcmp("pdf", String::Utf8Value(info[2])) | ^ In file included from ../src/Canvas.h:11, from ../src/Canvas.cc:7: /home/willilam/.cache/node-gyp/12.16.2/include/node/v8.h:3135:5: note: candidate: ‘v8::String::Utf8Value::Utf8Value(v8::Isolate, v8::Local)’ 3135 | Utf8Value(Isolate isolate, Local obj); | ^~~~~ /home/willilam/.cache/node-gyp/12.16.2/include/node/v8.h:3135:5: note: candidate expects 2 arguments, 1 provided ../src/Canvas.cc:78:48: error: no matching function for call to ‘v8::String::Utf8Value::Utf8Value(v8::Local)’ 78 | : !strcmp("svg", String::Utf8Value(info[2])) | ^ In file included from ../src/Canvas.h:11, from ../src/Canvas.cc:7: /home/willilam/.cache/node-gyp/12.16.2/include/node/v8.h:3135:5: note: candidate: ‘v8::String::Utf8Value::Utf8Value(v8::Isolate, v8::Local)’ 3135 | Utf8Value(Isolate isolate, Local obj); | ^~~~~ /home/willilam/.cache/node-gyp/12.16.2/include/node/v8.h:3135:5: note: candidate expects 2 arguments, 1 provided ../src/Canvas.cc: In static member function ‘static Nan::NAN_SETTER_RETURN_TYPE Canvas::SetWidth(v8::Local, v8::Local, Nan::NAN_SETTER_ARGS_TYPE)’: ../src/Canvas.cc:119:40: error: no matching function for call to ‘v8::Value::Uint32Value()’ 119 | canvas->width = value->Uint32Value(); | ^ In file included from ../src/Canvas.h:11, from ../src/Canvas.cc:7: /home/willilam/.cache/node-gyp/12.16.2/include/node/v8.h:2707:41: note: candidate: ‘v8::Maybe v8::Value::Uint32Value(v8::Local) const’ 2707 | V8_WARN_UNUSED_RESULT Maybe Uint32Value( | ^~~ /home/willilam/.cache/node-gyp/12.16.2/include/node/v8.h:2707:41: note: candidate expects 1 argument, 0 provided ../src/Canvas.cc: In static member function ‘static Nan::NAN_SETTER_RETURN_TYPE Canvas::SetHeight(v8::Local, v8::Local, Nan::NAN_SETTER_ARGS_TYPE)’: ../src/Canvas.cc:140:41: error: no matching function for call to ‘v8::Value::Uint32Value()’ 140 | canvas->height = value->Uint32Value(); | ^ In file included from ../src/Canvas.h:11, from ../src/Canvas.cc:7: /home/willilam/.cache/node-gyp/12.16.2/include/node/v8.h:2707:41: note: candidate: ‘v8::Maybe v8::Value::Uint32Value(v8::Local) const’ 2707 | V8_WARN_UNUSED_RESULT Maybe Uint32Value( | ^~~ /home/willilam/.cache/node-gyp/12.16.2/include/node/v8.h:2707:41: note: candidate expects 1 argument, 0 provided ../src/Canvas.cc: In static member function ‘static void Canvas::ToBufferAsyncAfter(uv_work_t)’: ../src/Canvas.cc:221:31: warning: ‘v8::Local Nan::Callback::Call(int, v8::Local) const’ is deprecated [-Wdeprecated-declarations] 221 | closure->pfn->Call(1, argv); | ^ In file included from ../src/Canvas.h:22, from ../src/Canvas.cc:7: ../../nan/nan.h:1744:3: note: declared here 1744 | Call(int argc, v8::Local argv[]) const { | ^~~~ ../src/Canvas.cc:226:31: warning: ‘v8::Local Nan::Callback::Call(int, v8::Local) const’ is deprecated [-Wdeprecated-declarations] 226 | closure->pfn->Call(2, argv); | ^ In file included from ../src/Canvas.h:22, from ../src/Canvas.cc:7: ../../nan/nan.h:1744:3: note: declared here 1744 | Call(int argc, v8::Local argv[]) const { | ^~~~ ../src/Canvas.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE Canvas::ToBuffer(Nan::NAN_METHOD_ARGS_TYPE)’: ../src/Canvas.cc:274:52: error: no matching function for call to ‘v8::Value::Uint32Value()’ 274 | compression_level = info[1]->Uint32Value(); | ^ In file included from ../src/Canvas.h:11, from ../src/Canvas.cc:7: /home/willilam/.cache/node-gyp/12.16.2/include/node/v8.h:2707:41: note: candidate: ‘v8::Maybe v8::Value::Uint32Value(v8::Local) const’ 2707 | V8_WARN_UNUSED_RESULT Maybe Uint32Value( | ^~~ /home/willilam/.cache/node-gyp/12.16.2/include/node/v8.h:2707:41: note: candidate expects 1 argument, 0 provided ../src/Canvas.cc:279:49: error: no matching function for call to ‘v8::Value::Uint32Value()’ 279 | uint32_t tmp = info[1]->Uint32Value(); | ^ In file included from ../src/Canvas.h:11, from ../src/Canvas.cc:7: /home/willilam/.cache/node-gyp/12.16.2/include/node/v8.h:2707:41: note: candidate: ‘v8::Maybe v8::Value::Uint32Value(v8::Local) const’ 2707 | V8_WARN_UNUSED_RESULT Maybe Uint32Value( | ^~~ /home/willilam/.cache/node-gyp/12.16.2/include/node/v8.h:2707:41: note: candidate expects 1 argument, 0 provided ../src/Canvas.cc:301:39: error: no matching function for call to ‘v8::Value::Uint32Value()’ 301 | filter = info[2]->Uint32Value(); | ^ In file included from ../src/Canvas.h:11, from ../src/Canvas.cc:7: /home/willilam/.cache/node-gyp/12.16.2/include/node/v8.h:2707:41: note: candidate: ‘v8::Maybe v8::Value::Uint32Value(v8::Local) const’ 2707 | V8_WARN_UNUSED_RESULT Maybe Uint32Value( | ^~~ /home/willilam/.cache/node-gyp/12.16.2/include/node/v8.h:2707:41: note: candidate expects 1 argument, 0 provided ../src/Canvas.cc:327:76: warning: cast between incompatible function types from ‘void ()(uv_work_t)’ {aka ‘void ()(uv_work_s)’} to ‘uv_after_work_cb’ {aka ‘void ()(uv_work_s, int)’} [-Wcast-function-type] 327 | uv_queue_work(uv_default_loop(), req, ToBufferAsync, (uv_after_work_cb)ToBufferAsyncAfter); | ^~~~~~ ../src/Canvas.cc: In function ‘cairo_status_t streamPNG(void, const uint8_t, unsigned int)’: ../src/Canvas.cc:377:102: warning: ‘v8::Local Nan::MakeCallback(v8::Local, v8::Local, int, v8::Local)’ is deprecated [-Wdeprecated-declarations] 377 | Nan::MakeCallback(Nan::GetCurrentContext()->Global(), (v8::Local)closure->fn, 3, argv); | ^ In file included from ../src/Canvas.h:22, from ../src/Canvas.cc:7: ../../nan/nan.h:1028:46: note: declared here 1028 | NAN_DEPRECATED inline v8::Local MakeCallback( | ^~~~ ../src/Canvas.cc:377:102: warning: ‘v8::Local Nan::MakeCallback(v8::Local, v8::Local, int, v8::Local)’ is deprecated [-Wdeprecated-declarations] 377 | Nan::MakeCallback(Nan::GetCurrentContext()->Global(), (v8::Local)closure->fn, 3, argv); | ^ In file included from ../src/Canvas.h:22, from ../src/Canvas.cc:7: ../../nan/nan.h:1028:46: note: declared here 1028 | NAN_DEPRECATED inline v8::Local MakeCallback( | ^~~~ ../src/Canvas.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE Canvas::StreamPNGSync(Nan::NAN_METHOD_ARGS_TYPE)’: ../src/Canvas.cc:396:52: error: no matching function for call to ‘v8::Value::Uint32Value()’ 396 | compression_level = info[1]->Uint32Value(); | ^ In file included from ../src/Canvas.h:11, from ../src/Canvas.cc:7: /home/willilam/.cache/node-gyp/12.16.2/include/node/v8.h:2707:41: note: candidate: ‘v8::Maybe v8::Value::Uint32Value(v8::Local) const’ 2707 | V8_WARN_UNUSED_RESULT Maybe Uint32Value( | ^~~ /home/willilam/.cache/node-gyp/12.16.2/include/node/v8.h:2707:41: note: candidate expects 1 argument, 0 provided ../src/Canvas.cc:401:49: error: no matching function for call to ‘v8::Value::Uint32Value()’ 401 | uint32_t tmp = info[1]->Uint32Value(); | ^ In file included from ../src/Canvas.h:11, from ../src/Canvas.cc:7: /home/willilam/.cache/node-gyp/12.16.2/include/node/v8.h:2707:41: note: candidate: ‘v8::Maybe v8::Value::Uint32Value(v8::Local) const’ 2707 | V8_WARN_UNUSED_RESULT Maybe Uint32Value( | ^~~ /home/willilam/.cache/node-gyp/12.16.2/include/node/v8.h:2707:41: note: candidate expects 1 argument, 0 provided ../src/Canvas.cc:423:39: error: no matching function for call to ‘v8::Value::Uint32Value()’ 423 | filter = info[2]->Uint32Value(); | ^ In file included from ../src/Canvas.h:11, from ../src/Canvas.cc:7: /home/willilam/.cache/node-gyp/12.16.2/include/node/v8.h:2707:41: note: candidate: ‘v8::Maybe v8::Value::Uint32Value(v8::Local) const’ 2707 | V8_WARN_UNUSED_RESULT Maybe Uint32Value( | ^~~ /home/willilam/.cache/node-gyp/12.16.2/include/node/v8.h:2707:41: note: candidate expects 1 argument, 0 provided ../src/Canvas.cc:446:103: warning: ‘v8::Local Nan::MakeCallback(v8::Local, v8::Local, int, v8::Local)’ is deprecated [-Wdeprecated-declarations] 446 | Nan::MakeCallback(Nan::GetCurrentContext()->Global(), (v8::Local)closure.fn, 1, argv); | ^ In file included from ../src/Canvas.h:22, from ../src/Canvas.cc:7: ../../nan/nan.h:1028:46: note: declared here 1028 | NAN_DEPRECATED inline v8::Local MakeCallback( | ^~~~ ../src/Canvas.cc:446:103: warning: ‘v8::Local Nan::MakeCallback(v8::Local, v8::Local, int, v8::Local)’ is deprecated [-Wdeprecated-declarations] 446 | Nan::MakeCallback(Nan::GetCurrentContext()->Global(), (v8::Local)closure.fn, 1, argv); | ^ In file included from ../src/Canvas.h:22, from ../src/Canvas.cc:7: ../../nan/nan.h:1028:46: note: declared here 1028 | NAN_DEPRECATED inline v8::Local MakeCallback( | ^~~~ ../src/Canvas.cc:452:103: warning: ‘v8::Local Nan::MakeCallback(v8::Local, v8::Local, int, v8::Local)’ is deprecated [-Wdeprecated-declarations] 452 | Nan::MakeCallback(Nan::GetCurrentContext()->Global(), (v8::Local)closure.fn, 1, argv); | ^ In file included from ../src/Canvas.h:22, from ../src/Canvas.cc:7: ../../nan/nan.h:1028:46: note: declared here 1028 | NAN_DEPRECATED inline v8::Local MakeCallback( | ^~~~ ../src/Canvas.cc:452:103: warning: ‘v8::Local Nan::MakeCallback(v8::Local, v8::Local, int, v8::Local)’ is deprecated [-Wdeprecated-declarations] 452 | Nan::MakeCallback(Nan::GetCurrentContext()->Global(), (v8::Local)closure.fn, 1, argv); | ^ In file included from ../src/Canvas.h:22, from ../src/Canvas.cc:7: ../../nan/nan.h:1028:46: note: declared here 1028 | NAN_DEPRECATED inline v8::Local MakeCallback( | ^~~~ ../src/Canvas.cc: In function ‘cairo_status_t streamPDF(void, const uint8_t, unsigned int)’: ../src/Canvas.cc:476:77: warning: ‘v8::Local Nan::MakeCallback(v8::Local, v8::Local, int, v8::Local)’ is deprecated [-Wdeprecated-declarations] 476 | Nan::MakeCallback(Nan::GetCurrentContext()->Global(), closure->fn, 3, argv); | ^ In file included from ../src/Canvas.h:22, from ../src/Canvas.cc:7: ../../nan/nan.h:1028:46: note: declared here 1028 | NAN_DEPRECATED inline v8::Local MakeCallback( | ^~~~ ../src/Canvas.cc:476:77: warning: ‘v8::Local Nan::MakeCallback(v8::Local, v8::Local, int, v8::Local)’ is deprecated [-Wdeprecated-declarations] 476 | Nan::MakeCallback(Nan::GetCurrentContext()->Global(), closure->fn, 3, argv); | ^ In file included from ../src/Canvas.h:22, from ../src/Canvas.cc:7: ../../nan/nan.h:1028:46: note: declared here 1028 | NAN_DEPRECATED inline v8::Local MakeCallback( | ^~~~ ../src/Canvas.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE Canvas::StreamJPEGSync(Nan::NAN_METHOD_ARGS_TYPE)’: ../src/Canvas.cc:557:64: error: no matching function for call to ‘v8::Value::NumberValue()’ 557 | write_to_jpeg_stream(canvas->surface(), info[0]->NumberValue(), info[1]->NumberValue(), info[2]->BooleanValue(), &closure); | ^ In file included from ../src/Canvas.h:11, from ../src/Canvas.cc:7: /home/willilam/.cache/node-gyp/12.16.2/include/node/v8.h:2704:39: note: candidate: ‘v8::Maybe v8::Value::NumberValue(v8::Local) const’ 2704 | V8_WARN_UNUSED_RESULT Maybe NumberValue(Local context) const; | ^~~ /home/willilam/.cache/node-gyp/12.16.2/include/node/v8.h:2704:39: note: candidate expects 1 argument, 0 provided ../src/Canvas.cc:557:88: error: no matching function for call to ‘v8::Value::NumberValue()’ 557 | write_to_jpeg_stream(canvas->surface(), info[0]->NumberValue(), info[1]->NumberValue(), info[2]->BooleanValue(), &closure); | ^ In file included from ../src/Canvas.h:11, from ../src/Canvas.cc:7: /home/willilam/.cache/node-gyp/12.16.2/include/node/v8.h:2704:39: note: candidate: ‘v8::Maybe v8::Value::NumberValue(v8::Local) const’ 2704 | V8_WARN_UNUSED_RESULT Maybe NumberValue(Local context) const; | ^~~ /home/willilam/.cache/node-gyp/12.16.2/include/node/v8.h:2704:39: note: candidate expects 1 argument, 0 provided ../src/Canvas.cc:557:113: error: no matching function for call to ‘v8::Value::BooleanValue()’ 557 | write_to_jpeg_stream(canvas->surface(), info[0]->NumberValue(), info[1]->NumberValue(), info[2]->BooleanValue(), &closure); | ^ In file included from ../src/Canvas.h:11, from ../src/Canvas.cc:7: /home/willilam/.cache/node-gyp/12.16.2/include/node/v8.h:2699:8: note: candidate: ‘bool v8::Value::BooleanValue(v8::Isolate) const’ 2699 | bool BooleanValue(Isolate isolate) const; | ^~~~ /home/willilam/.cache/node-gyp/12.16.2/include/node/v8.h:2699:8: note: candidate expects 1 argument, 0 provided In file included from /home/willilam/.cache/node-gyp/12.16.2/include/node/v8-internal.h:14, from /home/willilam/.cache/node-gyp/12.16.2/include/node/v8.h:27, from ../src/Canvas.h:11, from ../src/Canvas.cc:7: /home/willilam/.cache/node-gyp/12.16.2/include/node/v8.h:2702:51: note: candidate: ‘v8::Maybe v8::Value::BooleanValue(v8::Local) const’ 2702 | V8_WARN_UNUSED_RESULT Maybe BooleanValue( | ^~~~ /home/willilam/.cache/node-gyp/12.16.2/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’ 328 | declarator attribute((deprecated(message))) | ^~~~~~ /home/willilam/.cache/node-gyp/12.16.2/include/node/v8.h:2702:51: note: candidate expects 1 argument, 0 provided 2702 | V8_WARN_UNUSED_RESULT Maybe BooleanValue( | ^~~~ /home/willilam/.cache/node-gyp/12.16.2/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’ 328 | declarator attribute((deprecated(message))) | ^~~~~~ ../src/Canvas.cc: In member function ‘void Canvas::resurface(v8::Local)’: ../src/Canvas.cc:639:73: warning: ‘v8::Local v8::Object::Get(v8::Local)’ is deprecated: Use maybe version [-Wdeprecated-declarations] 639 | context = canvas->Get(Nan::New("context").ToLocalChecked()); | ^ In file included from /home/willilam/.cache/node-gyp/12.16.2/include/node/v8-internal.h:14, from /home/willilam/.cache/node-gyp/12.16.2/include/node/v8.h:27, from ../src/Canvas.h:11, from ../src/Canvas.cc:7: /home/willilam/.cache/node-gyp/12.16.2/include/node/v8.h:3553:51: note: declared here 3553 | V8_DEPRECATED("Use maybe version", Local Get(Local key)); | ^~~ /home/willilam/.cache/node-gyp/12.16.2/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’ 328 | declarator attribute((deprecated(message))) | ^~~~~~ ../src/Canvas.cc:641:85: error: no matching function for call to ‘v8::Value::ToObject()’ 641 | Context2d context2d = Nan::ObjectWrap::Unwrap(context->ToObject()); | ^ In file included from ../src/Canvas.h:11, from ../src/Canvas.cc:7: /home/willilam/.cache/node-gyp/12.16.2/include/node/v8.h:2672:44: note: candidate: ‘v8::MaybeLocal v8::Value::ToObject(v8::Local) const’ 2672 | V8_WARN_UNUSED_RESULT MaybeLocal ToObject( | ^~~~ /home/willilam/.cache/node-gyp/12.16.2/include/node/v8.h:2672:44: note: candidate expects 1 argument, 0 provided In file included from /home/willilam/.cache/node-gyp/12.16.2/include/node/v8-internal.h:14, from /home/willilam/.cache/node-gyp/12.16.2/include/node/v8.h:27, from ../src/Canvas.h:11, from ../src/Canvas.cc:7: /home/willilam/.cache/node-gyp/12.16.2/include/node/v8.h:2686:31: note: candidate: ‘v8::Local v8::Value::ToObject(v8::Isolate) const’ 2686 | Local ToObject(Isolate isolate) const); | ^~~~ /home/willilam/.cache/node-gyp/12.16.2/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’ 328 | declarator attribute((deprecated(message))) | ^~~~~~ /home/willilam/.cache/node-gyp/12.16.2/include/node/v8.h:2686:31: note: candidate expects 1 argument, 0 provided 2686 | Local ToObject(Isolate isolate) const); | ^~~~ /home/willilam/.cache/node-gyp/12.16.2/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’ 328 | declarator attribute((deprecated(message))) | ^~~~~~ ../src/Canvas.cc:655:73: warning: ‘v8::Local v8::Object::Get(v8::Local)’ is deprecated: Use maybe version [-Wdeprecated-declarations] 655 | context = canvas->Get(Nan::New("context").ToLocalChecked()); | ^ In file included from /home/willilam/.cache/node-gyp/12.16.2/include/node/v8-internal.h:14, from /home/willilam/.cache/node-gyp/12.16.2/include/node/v8.h:27, from ../src/Canvas.h:11, from ../src/Canvas.cc:7: /home/willilam/.cache/node-gyp/12.16.2/include/node/v8.h:3553:51: note: declared here 3553 | V8_DEPRECATED("Use maybe version", Local Get(Local key)); | ^~~ /home/willilam/.cache/node-gyp/12.16.2/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’ 328 | declarator attribute((deprecated(message))) | ^~~~~~ ../src/Canvas.cc:657:85: error: no matching function for call to ‘v8::Value::ToObject()’ 657 | Context2d context2d = Nan::ObjectWrap::Unwrap(context->ToObject()); | ^ In file included from ../src/Canvas.h:11, from ../src/Canvas.cc:7: /home/willilam/.cache/node-gyp/12.16.2/include/node/v8.h:2672:44: note: candidate: ‘v8::MaybeLocal v8::Value::ToObject(v8::Local) const’ 2672 | V8_WARN_UNUSED_RESULT MaybeLocal ToObject( | ^~~~ /home/willilam/.cache/node-gyp/12.16.2/include/node/v8.h:2672:44: note: candidate expects 1 argument, 0 provided In file included from /home/willilam/.cache/node-gyp/12.16.2/include/node/v8-internal.h:14, from /home/willilam/.cache/node-gyp/12.16.2/include/node/v8.h:27, from ../src/Canvas.h:11, from ../src/Canvas.cc:7: /home/willilam/.cache/node-gyp/12.16.2/include/node/v8.h:2686:31: note: candidate: ‘v8::Local v8::Value::ToObject(v8::Isolate) const’ 2686 | Local ToObject(Isolate isolate) const); | ^~~~ /home/willilam/.cache/node-gyp/12.16.2/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’ 328 | declarator attribute((deprecated(message))) | ^~~~~~ /home/willilam/.cache/node-gyp/12.16.2/include/node/v8.h:2686:31: note: candidate expects 1 argument, 0 provided 2686 | Local ToObject(Isolate isolate) const); | ^~~~ /home/willilam/.cache/node-gyp/12.16.2/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’ 328 | declarator attribute((deprecated(message))) | ^~~~~~ In file included from ../src/Canvas.h:11, from ../src/Canvas.cc:7: /home/willilam/.cache/node-gyp/12.16.2/include/node/v8.h: In instantiation of ‘void v8::PersistentBase::SetWeak(P, typename v8::WeakCallbackInfo

::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo

::Callback = void ()(const v8::WeakCallbackInfo&)]’: /home/willilam/.cache/node-gyp/12.16.2/include/node/node_object_wrap.h:85:78: required from here /home/willilam/.cache/node-gyp/12.16.2/include/node/v8.h:10226:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo::Callback’ {aka ‘void ()(const v8::WeakCallbackInfo&)’} to ‘Callback’ {aka ‘void ()(const v8::WeakCallbackInfo&)’} [-Wcast-function-type] 10226 | reinterpret_cast(callback), type); | ^~~~~~~~ /home/willilam/.cache/node-gyp/12.16.2/include/node/v8.h: In instantiation of ‘void v8::PersistentBase::SetWeak(P, typename v8::WeakCallbackInfo

::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo

::Callback = void ()(const v8::WeakCallbackInfo&)]’: ../../nan/nan_object_wrap.h:65:61: required from here /home/willilam/.cache/node-gyp/12.16.2/include/node/v8.h:10226:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo::Callback’ {aka ‘void ()(const v8::WeakCallbackInfo&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo&)’} [-Wcast-function-type] make: *** [canvas.target.mk:147: Release/obj.target/canvas/src/Canvas.o] Error 1 gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23) gyp ERR! stack at ChildProcess.emit (events.js:310:20) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12) gyp ERR! System Linux 5.13.0-28-generic gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /home/willilam/current_conventions_model/simulations/P3/node_modules/canvas gyp ERR! node -v v12.16.2 gyp ERR! node-gyp -v v5.1.0 gyp ERR! not ok npm WARN P3 No repository field. npm WARN P3 No license field.

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

npm ERR! A complete log of this run can be found in: npm ERR! /home/willilam/.npm/_logs/2022-02-04T17_54_44_489Z-debug.log

Debug log: 0 info it worked if it ends with ok 1 verbose cli [ 1 verbose cli '/usr/local/bin/node', 1 verbose cli '/usr/local/bin/npm', 1 verbose cli 'install', 1 verbose cli 'canvas@1.6' 1 verbose cli ] 2 info using npm@6.14.4 3 info using node@v12.16.2 4 verbose npm-session a55851a180554a73 5 silly install loadCurrentTree 6 silly install readLocalPackageData 7 http fetch GET 200 https://registry.npmjs.org/canvas 13ms (from cache) 8 silly pacote range manifest for canvas@1.6 fetched in 23ms 9 timing stage:loadCurrentTree Completed in 44ms 10 silly install loadIdealTree 11 silly install cloneCurrentTreeToIdealTree 12 timing stage:loadIdealTree:cloneCurrentTree Completed in 0ms 13 silly install loadShrinkwrap 14 warn read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I'll try to do my best with it! 15 timing stage:loadIdealTree:loadShrinkwrap Completed in 43ms 16 silly install loadAllDepsIntoIdealTree 17 silly resolveWithNewModule canvas@1.6.13 checking installable status 18 silly removeObsoleteDep removing canvas@2.9.0 from the tree as its been replaced by a newer version or is no longer required 19 silly removeObsoleteDep removing @mapbox/node-pre-gyp@1.0.8 from the tree as its been replaced by a newer version or is no longer required 20 silly removeObsoleteDep removing detect-libc@1.0.3 from the tree as its been replaced by a newer version or is no longer required 21 silly removeObsoleteDep removing https-proxy-agent@5.0.0 from the tree as its been replaced by a newer version or is no longer required 22 silly removeObsoleteDep removing agent-base@6.0.2 from the tree as its been replaced by a newer version or is no longer required 23 silly removeObsoleteDep removing debug@4.3.3 from the tree as its been replaced by a newer version or is no longer required 24 silly removeObsoleteDep removing ms@2.1.2 from the tree as its been replaced by a newer version or is no longer required 25 silly removeObsoleteDep removing make-dir@3.1.0 from the tree as its been replaced by a newer version or is no longer required 26 silly removeObsoleteDep removing semver@6.3.0 from the tree as its been replaced by a newer version or is no longer required 27 silly removeObsoleteDep removing node-fetch@2.6.7 from the tree as its been replaced by a newer version or is no longer required 28 silly removeObsoleteDep removing whatwg-url@5.0.0 from the tree as its been replaced by a newer version or is no longer required 29 silly removeObsoleteDep removing tr46@0.0.3 from the tree as its been replaced by a newer version or is no longer required 30 silly removeObsoleteDep removing webidl-conversions@3.0.1 from the tree as its been replaced by a newer version or is no longer required 31 silly removeObsoleteDep removing nopt@5.0.0 from the tree as its been replaced by a newer version or is no longer required 32 silly removeObsoleteDep removing abbrev@1.1.1 from the tree as its been replaced by a newer version or is no longer required 33 silly removeObsoleteDep removing npmlog@5.0.1 from the tree as its been replaced by a newer version or is no longer required 34 silly removeObsoleteDep removing are-we-there-yet@2.0.0 from the tree as its been replaced by a newer version or is no longer required 35 silly removeObsoleteDep removing delegates@1.0.0 from the tree as its been replaced by a newer version or is no longer required 36 silly removeObsoleteDep removing readable-stream@3.6.0 from the tree as its been replaced by a newer version or is no longer required 37 silly removeObsoleteDep removing inherits@2.0.4 from the tree as its been replaced by a newer version or is no longer required 38 silly removeObsoleteDep removing string_decoder@1.3.0 from the tree as its been replaced by a newer version or is no longer required 39 silly removeObsoleteDep removing safe-buffer@5.2.1 from the tree as its been replaced by a newer version or is no longer required 40 silly removeObsoleteDep removing util-deprecate@1.0.2 from the tree as its been replaced by a newer version or is no longer required 41 silly removeObsoleteDep removing console-control-strings@1.1.0 from the tree as its been replaced by a newer version or is no longer required 42 silly removeObsoleteDep removing gauge@3.0.2 from the tree as its been replaced by a newer version or is no longer required 43 silly removeObsoleteDep removing aproba@2.0.0 from the tree as its been replaced by a newer version or is no longer required 44 silly removeObsoleteDep removing color-support@1.1.3 from the tree as its been replaced by a newer version or is no longer required 45 silly removeObsoleteDep removing has-unicode@2.0.1 from the tree as its been replaced by a newer version or is no longer required 46 silly removeObsoleteDep removing object-assign@4.1.1 from the tree as its been replaced by a newer version or is no longer required 47 silly removeObsoleteDep removing signal-exit@3.0.6 from the tree as its been replaced by a newer version or is no longer required 48 silly removeObsoleteDep removing string-width@4.2.3 from the tree as its been replaced by a newer version or is no longer required 49 silly removeObsoleteDep removing emoji-regex@8.0.0 from the tree as its been replaced by a newer version or is no longer required 50 silly removeObsoleteDep removing is-fullwidth-code-point@3.0.0 from the tree as its been replaced by a newer version or is no longer required 51 silly removeObsoleteDep removing strip-ansi@6.0.1 from the tree as its been replaced by a newer version or is no longer required 52 silly removeObsoleteDep removing ansi-regex@5.0.1 from the tree as its been replaced by a newer version or is no longer required 53 silly removeObsoleteDep removing wide-align@1.1.5 from the tree as its been replaced by a newer version or is no longer required 54 silly removeObsoleteDep removing set-blocking@2.0.0 from the tree as its been replaced by a newer version or is no longer required 55 silly removeObsoleteDep removing rimraf@3.0.2 from the tree as its been replaced by a newer version or is no longer required 56 silly removeObsoleteDep removing glob@7.2.0 from the tree as its been replaced by a newer version or is no longer required 57 silly removeObsoleteDep removing fs.realpath@1.0.0 from the tree as its been replaced by a newer version or is no longer required 58 silly removeObsoleteDep removing inflight@1.0.6 from the tree as its been replaced by a newer version or is no longer required 59 silly removeObsoleteDep removing minimatch@3.0.4 from the tree as its been replaced by a newer version or is no longer required 60 silly removeObsoleteDep removing brace-expansion@1.1.11 from the tree as its been replaced by a newer version or is no longer required 61 silly removeObsoleteDep removing balanced-match@1.0.2 from the tree as its been replaced by a newer version or is no longer required 62 silly removeObsoleteDep removing concat-map@0.0.1 from the tree as its been replaced by a newer version or is no longer required 63 silly removeObsoleteDep removing path-is-absolute@1.0.1 from the tree as its been replaced by a newer version or is no longer required 64 silly removeObsoleteDep removing semver@7.3.5 from the tree as its been replaced by a newer version or is no longer required 65 silly removeObsoleteDep removing lru-cache@6.0.0 from the tree as its been replaced by a newer version or is no longer required 66 silly removeObsoleteDep removing yallist@4.0.0 from the tree as its been replaced by a newer version or is no longer required 67 silly removeObsoleteDep removing tar@6.1.11 from the tree as its been replaced by a newer version or is no longer required 68 silly removeObsoleteDep removing chownr@2.0.0 from the tree as its been replaced by a newer version or is no longer required 69 silly removeObsoleteDep removing fs-minipass@2.1.0 from the tree as its been replaced by a newer version or is no longer required 70 silly removeObsoleteDep removing minipass@3.1.6 from the tree as its been replaced by a newer version or is no longer required 71 silly removeObsoleteDep removing minizlib@2.1.2 from the tree as its been replaced by a newer version or is no longer required 72 silly removeObsoleteDep removing mkdirp@1.0.4 from the tree as its been replaced by a newer version or is no longer required 73 silly removeObsoleteDep removing nan@2.15.0 from the tree as its been replaced by a newer version or is no longer required 74 silly removeObsoleteDep removing simple-get@3.1.1 from the tree as its been replaced by a newer version or is no longer required 75 silly removeObsoleteDep removing decompress-response@4.2.1 from the tree as its been replaced by a newer version or is no longer required 76 silly removeObsoleteDep removing mimic-response@2.1.0 from the tree as its been replaced by a newer version or is no longer required 77 silly removeObsoleteDep removing once@1.4.0 from the tree as its been replaced by a newer version or is no longer required 78 silly removeObsoleteDep removing wrappy@1.0.2 from the tree as its been replaced by a newer version or is no longer required 79 silly removeObsoleteDep removing simple-concat@1.0.1 from the tree as its been replaced by a newer version or is no longer required 80 http fetch GET 200 https://registry.npmjs.org/nan 5ms (from cache) 81 silly pacote range manifest for nan@^2.10.0 fetched in 7ms 82 silly resolveWithNewModule nan@2.15.0 checking installable status 83 timing stage:loadIdealTree:loadAllDepsIntoIdealTree Completed in 12ms 84 timing stage:loadIdealTree Completed in 56ms 85 silly currentTree P3 86 silly idealTree P3 86 silly idealTree ├── canvas@1.6.13 86 silly idealTree └── nan@2.15.0 87 silly install generateActionsToTake 88 timing stage:generateActionsToTake Completed in 6ms 89 silly diffTrees action count 2 90 silly diffTrees add nan@2.15.0 91 silly diffTrees add canvas@1.6.13 92 silly decomposeActions action count 16 93 silly decomposeActions fetch nan@2.15.0 94 silly decomposeActions extract nan@2.15.0 95 silly decomposeActions preinstall nan@2.15.0 96 silly decomposeActions build nan@2.15.0 97 silly decomposeActions install nan@2.15.0 98 silly decomposeActions postinstall nan@2.15.0 99 silly decomposeActions finalize nan@2.15.0 100 silly decomposeActions refresh-package-json nan@2.15.0 101 silly decomposeActions fetch canvas@1.6.13 102 silly decomposeActions extract canvas@1.6.13 103 silly decomposeActions preinstall canvas@1.6.13 104 silly decomposeActions build canvas@1.6.13 105 silly decomposeActions install canvas@1.6.13 106 silly decomposeActions postinstall canvas@1.6.13 107 silly decomposeActions finalize canvas@1.6.13 108 silly decomposeActions refresh-package-json canvas@1.6.13 109 silly install executeActions 110 silly doSerial global-install 16 111 verbose correctMkdir /home/willilam/.npm/_locks correctMkdir not in flight; initializing 112 verbose lock using /home/willilam/.npm/_locks/staging-7a14770a250d4c58.lock for /home/willilam/current_conventions_model/simulations/P3/node_modules/.staging 113 silly doParallel extract 2 114 silly extract nan@2.15.0 115 silly extract canvas@1.6.13 116 silly tarball trying nan@^2.10.0 by hash: sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ== 117 silly tarball trying canvas@1.6 by hash: sha512-XAfzfEOHZ3JIPjEV+WSI6PpISgUta3dgmndWbsajotz+0TQOX/jDpp2kawjRERatOGv9sMMzk5auB3GKEKA6hg== 118 silly extract canvas@1.6 extracted to /home/willilam/current_conventions_model/simulations/P3/node_modules/.staging/canvas-0f492633 (48ms) 119 silly extract nan@^2.10.0 extracted to /home/willilam/current_conventions_model/simulations/P3/node_modules/.staging/nan-0155ced6 (51ms) 120 timing action:extract Completed in 53ms 121 silly doReverseSerial unbuild 16 122 silly doSerial remove 16 123 silly doSerial move 16 124 silly doSerial finalize 16 125 silly finalize /home/willilam/current_conventions_model/simulations/P3/node_modules/nan 126 silly finalize /home/willilam/current_conventions_model/simulations/P3/node_modules/canvas 127 timing action:finalize Completed in 3ms 128 silly doParallel refresh-package-json 2 129 silly refresh-package-json /home/willilam/current_conventions_model/simulations/P3/node_modules/nan 130 silly refresh-package-json /home/willilam/current_conventions_model/simulations/P3/node_modules/canvas 131 timing action:refresh-package-json Completed in 10ms 132 silly doParallel preinstall 2 133 silly preinstall nan@2.15.0 134 info lifecycle nan@2.15.0~preinstall: nan@2.15.0 135 silly preinstall canvas@1.6.13 136 info lifecycle canvas@1.6.13~preinstall: canvas@1.6.13 137 timing action:preinstall Completed in 2ms 138 silly doSerial build 16 139 silly build nan@2.15.0 140 info linkStuff nan@2.15.0 141 silly linkStuff nan@2.15.0 has /home/willilam/current_conventions_model/simulations/P3/node_modules as its parent node_modules 142 silly build canvas@1.6.13 143 info linkStuff canvas@1.6.13 144 silly linkStuff canvas@1.6.13 has /home/willilam/current_conventions_model/simulations/P3/node_modules as its parent node_modules 145 timing action:build Completed in 2ms 146 silly doSerial global-link 16 147 silly doParallel update-linked 0 148 silly doSerial install 16 149 silly install nan@2.15.0 150 info lifecycle nan@2.15.0~install: nan@2.15.0 151 silly install canvas@1.6.13 152 info lifecycle canvas@1.6.13~install: canvas@1.6.13 153 verbose lifecycle canvas@1.6.13~install: unsafe-perm in lifecycle true 154 verbose lifecycle canvas@1.6.13~install: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/willilam/current_conventions_model/simulations/P3/node_modules/canvas/node_modules/.bin:/home/willilam/current_conventions_model/simulations/P3/node_modules/.bin:/home/willilam/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin 155 verbose lifecycle canvas@1.6.13~install: CWD: /home/willilam/current_conventions_model/simulations/P3/node_modules/canvas 156 silly lifecycle canvas@1.6.13~install: Args: [ '-c', 'node-gyp rebuild' ] 157 timing audit submit Completed in 735ms 158 http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/audits/quick 735ms 159 timing audit body Completed in 1ms 160 silly lifecycle canvas@1.6.13~install: Returned: code: 1 signal: null 161 info lifecycle canvas@1.6.13~install: Failed to exec install script 162 timing action:install Completed in 1469ms 163 verbose unlock done using /home/willilam/.npm/_locks/staging-7a14770a250d4c58.lock for /home/willilam/current_conventions_model/simulations/P3/node_modules/.staging 164 timing stage:rollbackFailedOptional Completed in 23ms 165 timing stage:runTopLevelLifecycles Completed in 1702ms 166 silly saveTree P3 166 silly saveTree └─┬ canvas@1.6.13 166 silly saveTree └── nan@2.15.0 167 warn P3 No repository field. 168 warn P3 No license field. 169 verbose stack Error: canvas@1.6.13 install: node-gyp rebuild 169 verbose stack Exit status 1 169 verbose stack at EventEmitter. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16) 169 verbose stack at EventEmitter.emit (events.js:310:20) 169 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14) 169 verbose stack at ChildProcess.emit (events.js:310:20) 169 verbose stack at maybeClose (internal/child_process.js:1021:16) 169 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) 170 verbose pkgid canvas@1.6.13 171 verbose cwd /home/willilam/current_conventions_model/simulations/P3 172 verbose Linux 5.13.0-28-generic 173 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "canvas@1.6" 174 verbose node v12.16.2 175 verbose npm v6.14.4 176 error code ELIFECYCLE 177 error errno 1 178 error canvas@1.6.13 install: node-gyp rebuild 178 error Exit status 1 179 error Failed at the canvas@1.6.13 install script. 179 error This is probably not a problem with npm. There is likely additional logging output above. 180 verbose exit [ 1, true ]

Your Environment

  • node v12.6.2 Kubuntu 20.04
zbjornson commented 2 years ago

v1.6 is five years old and doesn't support newer Node.js. Please use 2.x.