Skip to content
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

sharp and canvas cannot coexist #575

Closed
strarsis opened this issue Sep 15, 2016 · 2 comments
Closed

sharp and canvas cannot coexist #575

strarsis opened this issue Sep 15, 2016 · 2 comments

Comments

@strarsis
Copy link

strarsis commented Sep 15, 2016

sharp and canvas modules cannot coexist in same node process,
when requiring both, execution fails with a low level error:

var sharp  = require('sharp'),
    Canvas = require('canvas');
[...]/node_modules/sharp/build/Release/../../lib/libgio-2.0.so.0: undefined symbol: g_option_group_unref
    at Error (native)
    at Object.Module._extensions..node (module.js:568:18)
    at Module.load (module.js:458:32)
    at tryModuleLoad (module.js:417:12)
    at Function.Module._load (module.js:409:3)
    at Module.require (module.js:468:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> ([...]/node_modules/sharp/index.js:12:13)
    at Module._compile (module.js:541:32)
    at Object.Module._extensions..js (module.js:550:10)
    at Module.load (module.js:458:32)
    at tryModuleLoad (module.js:417:12)
    at Function.Module._load (module.js:409:3)
    at Module.require (module.js:468:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> ([...]/test.js:1:76)

Issue filed for canvas: Automattic/node-canvas#812

@papandreou
Copy link
Contributor

Duplicate of #371

@lovell
Copy link
Owner

lovell commented Sep 15, 2016

The tl;dr of #371 is that if you are relying on a system-wide installation of cairo for node-canvas then you should also rely on a system-wide installation of libvips for sharp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants