-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows: with node-canvas, "cannot register existing type 'PangoCairoFontMap'" #2531
Comments
Hi, thanks for reporting, are you sure v0.26.0 is similarly broken? I think this relates to #2515, which only affects v0.27.0. |
Hi, But I opened an issue too quickly (Sorry....). My example is incomplete. The problem comes from an incompatibility with node-canvas once it is used (and not just loaded). Yes we have problème with 0.26.0 and 0.27.0. The 0.25.4 work.
|
Does setting the |
I have another error with
|
Thanks for checking, the only other quick fix I can think of is to alter the order in which sharp and canvas are required. Since v0.26.0 of sharp, the prebuilt shared library we provide is statically-linked to help avoid conflict with other native modules. The prebuilt binaries provided by canvas are all dynamically-linked DLLs, some of which are for rather old versions of the dependencies - see https://github.com/node-gfx/node-canvas-prebuilt - perhaps ask if they would be willing/able to either update or provide a single statically-linked DLL? |
We decided not to use node-canvas anymore. It's easier :) |
Are you using the latest version? Is the version currently in use as reported by
npm ls sharp
the same as the latest version as reported bynpm view sharp dist-tags.latest
?Yes (0.27.0)
What are the steps to reproduce?
More information
Sharp 0.25.4 on Windows 10
orSharp 0.27.0 on Linux
What is the expected behaviour?
Generate a PNG from SVG
Are you able to provide a minimal, standalone code sample, without other dependencies, that demonstrates this problem?
Are you able to provide a sample image that helps explain the problem?
No
What is the output of running
npx envinfo --binaries --system
?System:
OS: Windows 10 10.0.19042
CPU: (16) x64 Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz
Memory: 3.36 GB / 15.93 GB
Binaries:
Node: 14.15.1 - C:\Program Files\nodejs\node.EXE
npm: 6.13.7 - C:\Program Files\nodejs\npm.CMD
The text was updated successfully, but these errors were encountered: