node-canvas error

node-canvas error

Is there any other library I can use since `node-canvas` seems to be an issue, please recommend.


I tried using node-canvas with jsbarcode to process barcode from a node application but node-canvas seems to be an issue ever since I tried implementing using it.I have tried rebuilding from source yet the error still a blocker.


node:internal/modules/cjs/loader:1302
  return process.dlopen(module, path.toNamespacedPath(filename));
                 ^

Error: dlopen(/Users/mac/node_modules/canvas/build/Release/canvas.node, 1): Library not loaded: @loader_path/libpixman-1.0.42.2.dylib
  Referenced from: /Users/mac/node_modules/canvas/build/Release/canvas.node
  Reason: no suitable image found.  Did find:
        /Users/mac/node_modules/canvas/build/Release/libpixman-1.0.42.2.dylib: cannot load 'libpixman-1.0.42.2.dylib' (load command 0x80000034 is unknown)
        /Users/mac/node_modules/canvas/build/Release/libpixman-1.0.42.2.dylib: cannot load 'libpixman-1.0.42.2.dylib' (load command 0x80000034 is unknown)

Node.js v18.13.0
[nodemon] app crashed - waiting for file changes before starting…
Was this page helpful?