-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
node-canvas doesn't work #25974
Comments
This package relies on native Node addons (https://docs.deno.com/runtime/fundamentals/node/#node-api-addons) and thus require You can fix the problem by running with import { createCanvas } from 'npm:canvas';
I'll try to improve the error message to provide a helpful message here. |
Thank you very much @bartlomieju. I really don't want to have node_modules in my project, so I will have to fork one of these canvas repos. This canvas ecosystem needs to be pushed forward a bit. |
@alexgleason just for info: hopefully in the coming months we will have OffscreenCanvas in Deno; it will not have 2DContext initially, but it is something we will add later on |
Version: Deno 1.46.3
When trying to import node-canvas:
Why not use deno-canvas or skai_canvas instead? Because I am running into all kinds of issues: DjDeveloperr/deno-canvas#40 DjDeveloperr/skia_canvas#66 DjDeveloperr/skia_canvas#68 DjDeveloperr/skia_canvas#69
it's basically impossible to use a canvas library in Deno right now, and I thought with Node support node-canvas would be a last ditch effort, but something is blocking it from working here.
The text was updated successfully, but these errors were encountered: