Page MenuHomePhabricator

3d2png npm install errors
Closed, InvalidPublic

Description

Using npm 6.14.18...

> dtrace-provider@0.8.8 install /var/www/wiki/3d2png/node_modules/dtrace-provider
> node-gyp rebuild || node suppress-error.js

make: Entering directory '/var/www/wiki/3d2png/node_modules/dtrace-provider/build'
  TOUCH Release/obj.target/DTraceProviderStub.stamp
make: Leaving directory '/var/www/wiki/3d2png/node_modules/dtrace-provider/build'

> heapdump@0.3.15 install /var/www/wiki/3d2png/node_modules/heapdump
> node-gyp rebuild

make: Entering directory '/var/www/wiki/3d2png/node_modules/heapdump/build'
  CXX(target) Release/obj.target/addon/src/heapdump.o
In file included from ../src/heapdump.cc:15:
/home/reedy/.cache/node-gyp/14.21.3/include/node/node.h:793:7: warning: cast between incompatible function types from ‘void (*)(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’ {aka ‘void (*)(v8::Local<v8::Object>)’} to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type]
  793 |       (node::addon_register_func) (regfunc),                          \
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/reedy/.cache/node-gyp/14.21.3/include/node/node.h:827:3: note: in expansion of macro ‘NODE_MODULE_X’
  827 |   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
      |   ^~~~~~~~~~~~~
../src/heapdump.cc:136:1: note: in expansion of macro ‘NODE_MODULE’
  136 | NODE_MODULE(addon, Initialize)
      | ^~~~~~~~~~~
  SOLINK_MODULE(target) Release/obj.target/addon.node
  COPY Release/addon.node
make: Leaving directory '/var/www/wiki/3d2png/node_modules/heapdump/build'

> unix-dgram@2.0.6 install /var/www/wiki/3d2png/node_modules/unix-dgram
> node-gyp rebuild

make: Entering directory '/var/www/wiki/3d2png/node_modules/unix-dgram/build'
  CXX(target) Release/obj.target/unix_dgram/src/unix_dgram.o
In file included from ../../nan/nan.h:60,
                 from ../src/unix_dgram.cc:5:
/home/reedy/.cache/node-gyp/14.21.3/include/node/node.h:793:7: warning: cast between incompatible function types from ‘void (*)(v8::Local<v8::Object>)’ to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type]
  793 |       (node::addon_register_func) (regfunc),                          \
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/reedy/.cache/node-gyp/14.21.3/include/node/node.h:827:3: note: in expansion of macro ‘NODE_MODULE_X’
  827 |   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
      |   ^~~~~~~~~~~~~
../src/unix_dgram.cc:404:1: note: in expansion of macro ‘NODE_MODULE’
  404 | NODE_MODULE(unix_dgram, Initialize)
      | ^~~~~~~~~~~
  SOLINK_MODULE(target) Release/obj.target/unix_dgram.node
  COPY Release/unix_dgram.node
make: Leaving directory '/var/www/wiki/3d2png/node_modules/unix-dgram/build'

> canvas@1.6.5 install /var/www/wiki/3d2png/node_modules/canvas
> node-gyp rebuild

Package cairo was not found in the pkg-config search path.
Perhaps you should add the directory containing `cairo.pc'
to the PKG_CONFIG_PATH environment variable
No package 'cairo' found
gyp: Call to './util/has_lib.sh freetype' returned exit status 0 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack     at ChildProcess.emit (events.js:400:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:285:12)
gyp ERR! System Linux 5.15.0-83-generic
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /var/www/wiki/3d2png/node_modules/canvas
gyp ERR! node -v v14.21.3
gyp ERR! node-gyp -v v5.1.1
gyp ERR! not ok 
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.2 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! canvas@1.6.5 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the canvas@1.6.5 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/reedy/.npm/_logs/2023-09-08T20_13_40_735Z-debug.log

Event Timeline

I think this is a dependency issue - I get a successful build on buster after installing libcairo2-dev libjpeg-dev libgif-dev with the current master

I’ll have a look in a bit…

May just be a documentation update needed

$ dpkg -l | grep libcairo2
ii  libcairo2:amd64                       1.16.0-5ubuntu2                                                      amd64        Cairo 2D vector graphics library
$ dpkg -l | grep libjpeg
ii  libjpeg-dev:amd64                     8c-2ubuntu10                                                         amd64        Independent JPEG Group's JPEG runtime library (dependency package)
ii  libjpeg-turbo8:amd64                  2.1.2-0ubuntu1                                                       amd64        IJG JPEG compliant runtime library.
ii  libjpeg-turbo8-dev:amd64              2.1.2-0ubuntu1                                                       amd64        Development files for the IJG JPEG library
ii  libjpeg8:amd64                        8c-2ubuntu10                                                         amd64        Independent JPEG Group's JPEG runtime library (dependency package)
ii  libjpeg8-dev:amd64                    8c-2ubuntu10                                                         amd64        Independent JPEG Group's JPEG runtime library (dependency package)
$ dpkg -l | grep libgif
ii  libgif7:amd64                         5.1.9-2build2                                                        amd64        library for GIF images (library)

So the -dev were missing were missing... Install and try again

$ npm install

> canvas@1.6.5 install /var/www/wiki/3d2png/node_modules/canvas
> node-gyp rebuild

make: Entering directory '/var/www/wiki/3d2png/node_modules/canvas/build'
  SOLINK_MODULE(target) Release/obj.target/canvas-postbuild.node
  COPY Release/canvas-postbuild.node
  CXX(target) Release/obj.target/canvas/src/Canvas.o
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:20: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations]
   42 |   Nan::MakeCallback(Nan::GetCurrentContext()->Global(), (v8::Local<v8::Function>)dest->closure->fn, 2, argv);
      |   ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../src/Canvas.h:22,
                 from ../src/Canvas.cc:7:
../../nan/nan.h:1030:46: note: declared here
 1030 |   NAN_DEPRECATED inline v8::Local<v8::Value> 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:20: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations]
   63 |   Nan::MakeCallback(Nan::GetCurrentContext()->Global(), (v8::Local<v8::Function>)dest->closure->fn, 2, data_argv);
      |   ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../src/Canvas.h:22,
                 from ../src/Canvas.cc:7:
../../nan/nan.h:1030:46: note: declared here
 1030 |   NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
      |                                              ^~~~~~~~~~~~
In file included from ../src/Canvas.cc:20:
../src/JPEGStream.h:71:20: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations]
   71 |   Nan::MakeCallback(Nan::GetCurrentContext()->Global(), (v8::Local<v8::Function>)dest->closure->fn, 2, end_argv);
      |   ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../src/Canvas.h:22,
                 from ../src/Canvas.cc:7:
../../nan/nan.h:1030:46: note: declared here
 1030 |   NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
      |                                              ^~~~~~~~~~~~
../src/Canvas.cc: In static member function ‘static void Canvas::Initialize(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’:
../src/Canvas.cc:60:74: 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/reedy/.cache/node-gyp/14.21.3/include/node/v8.h:6482:46: note: candidate: ‘v8::MaybeLocal<v8::Function> v8::FunctionTemplate::GetFunction(v8::Local<v8::Context>)’
 6482 |   V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
      |                                              ^~~~~~~~~~~
/home/reedy/.cache/node-gyp/14.21.3/include/node/v8.h:6482: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:56: 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/reedy/.cache/node-gyp/14.21.3/include/node/v8.h:2866:41: note: candidate: ‘v8::Maybe<unsigned int> v8::Value::Uint32Value(v8::Local<v8::Context>) const’
 2866 |   V8_WARN_UNUSED_RESULT Maybe<uint32_t> Uint32Value(
      |                                         ^~~~~~~~~~~
/home/reedy/.cache/node-gyp/14.21.3/include/node/v8.h:2866:41: note:   candidate expects 1 argument, 0 provided
../src/Canvas.cc:75:57: 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/reedy/.cache/node-gyp/14.21.3/include/node/v8.h:2866:41: note: candidate: ‘v8::Maybe<unsigned int> v8::Value::Uint32Value(v8::Local<v8::Context>) const’
 2866 |   V8_WARN_UNUSED_RESULT Maybe<uint32_t> Uint32Value(
      |                                         ^~~~~~~~~~~
/home/reedy/.cache/node-gyp/14.21.3/include/node/v8.h:2866: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<v8::Value>)’
   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/reedy/.cache/node-gyp/14.21.3/include/node/v8.h:3287:5: note: candidate: ‘v8::String::Utf8Value::Utf8Value(v8::Isolate*, v8::Local<v8::Value>)’
 3287 |     Utf8Value(Isolate* isolate, Local<v8::Value> obj);
      |     ^~~~~~~~~
/home/reedy/.cache/node-gyp/14.21.3/include/node/v8.h:3287: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<v8::Value>)’
   78 |     : !strcmp("svg", *String::Utf8Value(info[2]))
      |                                                ^
In file included from ../src/Canvas.h:11,
                 from ../src/Canvas.cc:7:
/home/reedy/.cache/node-gyp/14.21.3/include/node/v8.h:3287:5: note: candidate: ‘v8::String::Utf8Value::Utf8Value(v8::Isolate*, v8::Local<v8::Value>)’
 3287 |     Utf8Value(Isolate* isolate, Local<v8::Value> obj);
      |     ^~~~~~~~~
/home/reedy/.cache/node-gyp/14.21.3/include/node/v8.h:3287: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::String>, v8::Local<v8::Value>, Nan::NAN_SETTER_ARGS_TYPE)’:
../src/Canvas.cc:119:39: 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/reedy/.cache/node-gyp/14.21.3/include/node/v8.h:2866:41: note: candidate: ‘v8::Maybe<unsigned int> v8::Value::Uint32Value(v8::Local<v8::Context>) const’
 2866 |   V8_WARN_UNUSED_RESULT Maybe<uint32_t> Uint32Value(
      |                                         ^~~~~~~~~~~
/home/reedy/.cache/node-gyp/14.21.3/include/node/v8.h:2866: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::String>, v8::Local<v8::Value>, Nan::NAN_SETTER_ARGS_TYPE)’:
../src/Canvas.cc:140:40: 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/reedy/.cache/node-gyp/14.21.3/include/node/v8.h:2866:41: note: candidate: ‘v8::Maybe<unsigned int> v8::Value::Uint32Value(v8::Local<v8::Context>) const’
 2866 |   V8_WARN_UNUSED_RESULT Maybe<uint32_t> Uint32Value(
      |                                         ^~~~~~~~~~~
/home/reedy/.cache/node-gyp/14.21.3/include/node/v8.h:2866: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:23: warning: ‘v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) 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:1746:3: note: declared here
 1746 |   Call(int argc, v8::Local<v8::Value> argv[]) const {
      |   ^~~~
../src/Canvas.cc:226:23: warning: ‘v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) 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:1746:3: note: declared here
 1746 |   Call(int argc, v8::Local<v8::Value> 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:51: 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/reedy/.cache/node-gyp/14.21.3/include/node/v8.h:2866:41: note: candidate: ‘v8::Maybe<unsigned int> v8::Value::Uint32Value(v8::Local<v8::Context>) const’
 2866 |   V8_WARN_UNUSED_RESULT Maybe<uint32_t> Uint32Value(
      |                                         ^~~~~~~~~~~
/home/reedy/.cache/node-gyp/14.21.3/include/node/v8.h:2866:41: note:   candidate expects 1 argument, 0 provided
../src/Canvas.cc:279:48: 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/reedy/.cache/node-gyp/14.21.3/include/node/v8.h:2866:41: note: candidate: ‘v8::Maybe<unsigned int> v8::Value::Uint32Value(v8::Local<v8::Context>) const’
 2866 |   V8_WARN_UNUSED_RESULT Maybe<uint32_t> Uint32Value(
      |                                         ^~~~~~~~~~~
/home/reedy/.cache/node-gyp/14.21.3/include/node/v8.h:2866:41: note:   candidate expects 1 argument, 0 provided
../src/Canvas.cc:301:38: 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/reedy/.cache/node-gyp/14.21.3/include/node/v8.h:2866:41: note: candidate: ‘v8::Maybe<unsigned int> v8::Value::Uint32Value(v8::Local<v8::Context>) const’
 2866 |   V8_WARN_UNUSED_RESULT Maybe<uint32_t> Uint32Value(
      |                                         ^~~~~~~~~~~
/home/reedy/.cache/node-gyp/14.21.3/include/node/v8.h:2866:41: note:   candidate expects 1 argument, 0 provided
../src/Canvas.cc:327:58: 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:20: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations]
  377 |   Nan::MakeCallback(Nan::GetCurrentContext()->Global(), (v8::Local<v8::Function>)closure->fn, 3, argv);
      |   ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../src/Canvas.h:22,
                 from ../src/Canvas.cc:7:
../../nan/nan.h:1030:46: note: declared here
 1030 |   NAN_DEPRECATED inline v8::Local<v8::Value> 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:51: 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/reedy/.cache/node-gyp/14.21.3/include/node/v8.h:2866:41: note: candidate: ‘v8::Maybe<unsigned int> v8::Value::Uint32Value(v8::Local<v8::Context>) const’
 2866 |   V8_WARN_UNUSED_RESULT Maybe<uint32_t> Uint32Value(
      |                                         ^~~~~~~~~~~
/home/reedy/.cache/node-gyp/14.21.3/include/node/v8.h:2866:41: note:   candidate expects 1 argument, 0 provided
../src/Canvas.cc:401:48: 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/reedy/.cache/node-gyp/14.21.3/include/node/v8.h:2866:41: note: candidate: ‘v8::Maybe<unsigned int> v8::Value::Uint32Value(v8::Local<v8::Context>) const’
 2866 |   V8_WARN_UNUSED_RESULT Maybe<uint32_t> Uint32Value(
      |                                         ^~~~~~~~~~~
/home/reedy/.cache/node-gyp/14.21.3/include/node/v8.h:2866:41: note:   candidate expects 1 argument, 0 provided
../src/Canvas.cc:423:38: 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/reedy/.cache/node-gyp/14.21.3/include/node/v8.h:2866:41: note: candidate: ‘v8::Maybe<unsigned int> v8::Value::Uint32Value(v8::Local<v8::Context>) const’
 2866 |   V8_WARN_UNUSED_RESULT Maybe<uint32_t> Uint32Value(
      |                                         ^~~~~~~~~~~
/home/reedy/.cache/node-gyp/14.21.3/include/node/v8.h:2866:41: note:   candidate expects 1 argument, 0 provided
../src/Canvas.cc:446:22: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations]
  446 |     Nan::MakeCallback(Nan::GetCurrentContext()->Global(), (v8::Local<v8::Function>)closure.fn, 1, argv);
      |     ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../src/Canvas.h:22,
                 from ../src/Canvas.cc:7:
../../nan/nan.h:1030:46: note: declared here
 1030 |   NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
      |                                              ^~~~~~~~~~~~
../src/Canvas.cc:452:22: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations]
  452 |     Nan::MakeCallback(Nan::GetCurrentContext()->Global(), (v8::Local<v8::Function>)closure.fn, 1, argv);
      |     ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../src/Canvas.h:22,
                 from ../src/Canvas.cc:7:
../../nan/nan.h:1030:46: note: declared here
 1030 |   NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
      |                                              ^~~~~~~~~~~~
../src/Canvas.cc: In function ‘cairo_status_t streamPDF(void*, const uint8_t*, unsigned int)’:
../src/Canvas.cc:476:20: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ 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:1030:46: note: declared here
 1030 |   NAN_DEPRECATED inline v8::Local<v8::Value> 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:63: 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/reedy/.cache/node-gyp/14.21.3/include/node/v8.h:2861:39: note: candidate: ‘v8::Maybe<double> v8::Value::NumberValue(v8::Local<v8::Context>) const’
 2861 |   V8_WARN_UNUSED_RESULT Maybe<double> NumberValue(Local<Context> context) const;
      |                                       ^~~~~~~~~~~
/home/reedy/.cache/node-gyp/14.21.3/include/node/v8.h:2861:39: note:   candidate expects 1 argument, 0 provided
../src/Canvas.cc:557:87: 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/reedy/.cache/node-gyp/14.21.3/include/node/v8.h:2861:39: note: candidate: ‘v8::Maybe<double> v8::Value::NumberValue(v8::Local<v8::Context>) const’
 2861 |   V8_WARN_UNUSED_RESULT Maybe<double> NumberValue(Local<Context> context) const;
      |                                       ^~~~~~~~~~~
/home/reedy/.cache/node-gyp/14.21.3/include/node/v8.h:2861:39: note:   candidate expects 1 argument, 0 provided
../src/Canvas.cc:557:112: 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/reedy/.cache/node-gyp/14.21.3/include/node/v8.h:2858:8: note: candidate: ‘bool v8::Value::BooleanValue(v8::Isolate*) const’
 2858 |   bool BooleanValue(Isolate* isolate) const;
      |        ^~~~~~~~~~~~
/home/reedy/.cache/node-gyp/14.21.3/include/node/v8.h:2858:8: note:   candidate expects 1 argument, 0 provided
../src/Canvas.cc: In member function ‘void Canvas::resurface(v8::Local<v8::Object>)’:
../src/Canvas.cc:639:28: error: no matching function for call to ‘v8::Object::Get(v8::Local<v8::String>)’
  639 |       context = canvas->Get(Nan::New<String>("context").ToLocalChecked());
      |                 ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../src/Canvas.h:11,
                 from ../src/Canvas.cc:7:
/home/reedy/.cache/node-gyp/14.21.3/include/node/v8.h:3717:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, v8::Local<v8::Value>)’
 3717 |   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
      |                                           ^~~
/home/reedy/.cache/node-gyp/14.21.3/include/node/v8.h:3717:43: note:   candidate expects 2 arguments, 1 provided
/home/reedy/.cache/node-gyp/14.21.3/include/node/v8.h:3720:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, uint32_t)’
 3720 |   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
      |                                           ^~~
/home/reedy/.cache/node-gyp/14.21.3/include/node/v8.h:3720:43: note:   candidate expects 2 arguments, 1 provided
../src/Canvas.cc:641:84: error: no matching function for call to ‘v8::Value::ToObject()’
  641 |         Context2d *context2d = Nan::ObjectWrap::Unwrap<Context2d>(context->ToObject());
      |                                                                   ~~~~~~~~~~~~~~~~~^~
In file included from ../src/Canvas.h:11,
                 from ../src/Canvas.cc:7:
/home/reedy/.cache/node-gyp/14.21.3/include/node/v8.h:2822:44: note: candidate: ‘v8::MaybeLocal<v8::Object> v8::Value::ToObject(v8::Local<v8::Context>) const’
 2822 |   V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
      |                                            ^~~~~~~~
/home/reedy/.cache/node-gyp/14.21.3/include/node/v8.h:2822:44: note:   candidate expects 1 argument, 0 provided
../src/Canvas.cc:655:28: error: no matching function for call to ‘v8::Object::Get(v8::Local<v8::String>)’
  655 |       context = canvas->Get(Nan::New<String>("context").ToLocalChecked());
      |                 ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../src/Canvas.h:11,
                 from ../src/Canvas.cc:7:
/home/reedy/.cache/node-gyp/14.21.3/include/node/v8.h:3717:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, v8::Local<v8::Value>)’
 3717 |   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
      |                                           ^~~
/home/reedy/.cache/node-gyp/14.21.3/include/node/v8.h:3717:43: note:   candidate expects 2 arguments, 1 provided
/home/reedy/.cache/node-gyp/14.21.3/include/node/v8.h:3720:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, uint32_t)’
 3720 |   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
      |                                           ^~~
/home/reedy/.cache/node-gyp/14.21.3/include/node/v8.h:3720:43: note:   candidate expects 2 arguments, 1 provided
../src/Canvas.cc:657:84: error: no matching function for call to ‘v8::Value::ToObject()’
  657 |         Context2d *context2d = Nan::ObjectWrap::Unwrap<Context2d>(context->ToObject());
      |                                                                   ~~~~~~~~~~~~~~~~~^~
In file included from ../src/Canvas.h:11,
                 from ../src/Canvas.cc:7:
/home/reedy/.cache/node-gyp/14.21.3/include/node/v8.h:2822:44: note: candidate: ‘v8::MaybeLocal<v8::Object> v8::Value::ToObject(v8::Local<v8::Context>) const’
 2822 |   V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
      |                                            ^~~~~~~~
/home/reedy/.cache/node-gyp/14.21.3/include/node/v8.h:2822:44: note:   candidate expects 1 argument, 0 provided
/home/reedy/.cache/node-gyp/14.21.3/include/node/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)]’:
/home/reedy/.cache/node-gyp/14.21.3/include/node/node_object_wrap.h:85:25:   required from here
/home/reedy/.cache/node-gyp/14.21.3/include/node/v8.h:10886:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<node::ObjectWrap>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type]
10886 |                reinterpret_cast<Callback>(callback), type);
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/reedy/.cache/node-gyp/14.21.3/include/node/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)]’:
../../nan/nan_object_wrap.h:64:57:   required from here
/home/reedy/.cache/node-gyp/14.21.3/include/node/v8.h:10886:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<Nan::ObjectWrap>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type]
make: *** [canvas.target.mk:139: Release/obj.target/canvas/src/Canvas.o] Error 1
make: Leaving directory '/var/www/wiki/3d2png/node_modules/canvas/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:400:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:285:12)
gyp ERR! System Linux 5.15.0-83-generic
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /var/www/wiki/3d2png/node_modules/canvas
gyp ERR! node -v v14.21.3
gyp ERR! node-gyp -v v5.1.1
gyp ERR! not ok 
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.2 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! canvas@1.6.5 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the canvas@1.6.5 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/reedy/.npm/_logs/2023-09-11T12_35_23_626Z-debug.log
$ 

Hmm, weird - On a fresh checkout of master I get a successful install:

nosmo@ocasey ~/tmp $ git clone ssh://gerrit.wikimedia.org:29418/3d2png
nosmo@ocasey ~/tmp $ docker run -it  --mount type=bind,source=`pwd`/3d2png,destination=/3d2png/  docker-registry.wikimedia.org/buster-nodejs10-devel /bin/bash
root@3c04b767f80a:/# apt install -y build-essential git libcairo2-dev libjpeg-dev libgif-dev pkg-config
... <snip> ...
root@3c04b767f80a:/# cd /3d2png
root@3c04b767f80a:/3d2png# npm install 
... <snip> ...
> gl@4.0.4 install /3d2png/node_modules/gl
> prebuild-install || node-gyp rebuild

npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.2 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

added 361 packages from 219 contributors in 76.939s
root@3c04b767f80a:/3d2png#

What version of npm etc?

Just the versions that come pre-installed on that container:

ii  npm            5.8.0+ds6-4+deb10u2 all          package manager for Node.js
ii  nodejs         10.24.0~dfsg-1~deb10u3 amd64        evented I/O for V8 javascript - runtime executable