You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an Electron app that uses pdfjs-dist. On Mac OSX, the app was working perfectly. But I had to use a new computer with OSX Ventura 13.4.1 (the latest Apple os).
When simply installing pdfjs-dist, not even importing nor using it, the app can't compile and crashes immediately. The error is:
›Package'gobject-2.0'requires'libffi >= 3.0.0'butversionoflibffiis2.1Package'gobject-2.0'requires'libffi >= 3.0.0'butversionoflibffiis2.1SOLINK_MODULE(target)Release/canvas-postbuild.nodeCXX(target)Release/obj.target/canvas/src/backend/Backend.oInfileincludedfrom../src/backend/Backend.cc:1:
../src/backend/Backend.h:3:10: fatalerror: 'cairo.h'filenotfound
#include <cairo.h>
^~~~~~~~~
1 error generated.
make: *** [Release/obj.target/canvas/src/backend/Backend.o] Error 1
Error: `make` failed with exit code: 2
at ChildProcess.onExit (/Users/myname/Desktop/myapp/node_modules/node-gyp/lib/build.j…
at ChildProcess.emit (node:events:513:28)
at ChildProcess._handle.onexit (node:internal/child_process:291:12)
An unhandled rejection has occurred inside Forge:
Error: node-gyp failed to rebuild '/Users/myname/Desktop/myapp/node_modules/canvas'
at ChildProcess.<anonymous> (/Users/myname/Desktop/myapp/node_modules/@electron/rebuild/lib/module-type/node-gyp/node-gyp.js:118:24)
at ChildProcess.emit (node:events:513:28)
at ChildProcess._handle.onexit (node:internal/child_process:291:12)
I have browsed your github issues, and I have installed every related packages that might be needed with brew: pkg-config, cairo , pango, libpng, jpeg, giflib, librsvg, libffi. The computer has Node 18.16.1.
Configuration:
Operating system and its version: OSX 13.4.1 (Ventura)
PDF.js version: 3.8.162
I know the issue talks about Electron, BUT, the crash happens when simply installing pdfjs-dist, so the issue definitely comes from here. Also, canvas is marked as an optionalDependenciesof pdfjs-dist. Maybe I need to install an additional package?
Thank you!
The text was updated successfully, but these errors were encountered:
In any case, what I think you're missing is libcairo2-dev (see https://packages.debian.org/sid/libcairo2-dev, not sure what the OSX alternative is given that I only use Linux) since that contains the development header files; usually those are separate from the regular cairo package.
Hello,
I have an Electron app that uses
pdfjs-dist
. On Mac OSX, the app was working perfectly. But I had to use a new computer with OSX Ventura 13.4.1 (the latest Apple os).When simply installing
pdfjs-dist
, not even importing nor using it, the app can't compile and crashes immediately. The error is:I have browsed your github issues, and I have installed every related packages that might be needed with brew:
pkg-config
,cairo
,pango
,libpng
,jpeg
,giflib
,librsvg
,libffi
. The computer has Node18.16.1
.Configuration:
I know the issue talks about Electron, BUT, the crash happens when simply installing
pdfjs-dist
, so the issue definitely comes from here. Also,canvas
is marked as anoptionalDependencies
ofpdfjs-dist
. Maybe I need to install an additional package?Thank you!
The text was updated successfully, but these errors were encountered: