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

Investigate alternatives to node-canvas library #29

Open
Balearica opened this issue Dec 12, 2024 · 1 comment
Open

Investigate alternatives to node-canvas library #29

Balearica opened this issue Dec 12, 2024 · 1 comment

Comments

@Balearica
Copy link
Contributor

The primary source of limitations and bug reports on the Node.js version stems from our use of the node-canvas library. We use this library because various features use the Canvas API, which is implemented natively in browser but not Node.js. We should investigate if any alternative libraries exist.

@bennyzen
Copy link

bennyzen commented Dec 13, 2024

What many people (including myself) initially struggle with are the deps needed on the host to get node-canvas running. Just looking at their README, there is no direct mention of these vital deps. Looking at the issues there, it becomes pretty obvious that many people are struggling with it. Not being aware that scribe.js uses node-canvas under the hood, doesn't make it easier to understand why it's not working.

Just as an example, using a Node v22 container in Docker based on Debian Bookworm, one would need to do something like this in his Dockerfile to get it running:

RUN apt-get install -y build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev

It's not that obvious to guess, despite the fact that these deps and package names vary from OS to OS.

And yes, you're right that it can be a showstopper. Thinking about an alternative, nothing equivalent comes to my mind.

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

2 participants