-
Notifications
You must be signed in to change notification settings - Fork 631
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
"You need to specify a canvas element" error when using Cloudflare Workers with qrcode
#349
Comments
same here |
I'm also looking for a solution to generate QR codes without access to DOM |
Try using node-canvas |
same here |
Not a fix for this library, but if anyone is desperate here might be some leads |
A solution is just using |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am encountering an error when attempting to generate a QR code using the qrcode library within a Cloudflare Worker. The error message is "You need to specify a canvas element".
Error stack:
Environment:
Steps to Reproduce:
Expected Result:
The QR code should be generated successfully.
Actual Result:
Encountering the above error, which seems to suggest a canvas element is required.
I would appreciate any guidance or suggestions on how to resolve this issue, especially considering the context of using Cloudflare Workers where a DOM-based canvas isn't available.
Thank you!
Below is the source code for the worker
The text was updated successfully, but these errors were encountered: