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

canvas and sharp cannot coexist #812

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

canvas and sharp cannot coexist #812

strarsis opened this issue Sep 15, 2016 · 2 comments

Comments

@strarsis
Copy link

canvas and sharp cannot coexist

Issue or Feature

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

[...]/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)

Steps to Reproduce

var Canvas = require('canvas'),
    sharp  = require('sharp');

Your Environment

  • node v6.3.0
  • canvas@1.5.0
  • sharp@0.16.0
  • Debian Jessie (8)

Issue filed for sharp: lovell/sharp#575

@chearon
Copy link
Collaborator

chearon commented Sep 15, 2016

Sounds like it's a library loading issue external to either project:

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.

Either use canvas-prebuilt or have both of them use system-wide libraries

@zbjornson
Copy link
Collaborator

@strarsis if you're still looking for a solution, please check out #930.

@strarsis strarsis closed this as completed Jul 3, 2017
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