Closed LandonSchropp closed 3 years ago
I figured it out—I was using a string for the size instead of an int.
One thing I did discover while doing this is you can drop the canvas-to-buffer
dependency. The canvas
library you're using has a toBuffer
function you can call like this:
return canvas.toBuffer("image/png");
When I used the library version, it gave me an error message that helped me identify and fix my issue.
Very nice find, I'll 100% remove that dependency and implement that 😀
One step further from package phobia!
👍
chess-image-generator version: 1.0.9
Steps to reproduce
Expected behavior
This should output an image.
Actual behavior
It fails with this error:
It looks like the
generateBuffer
function always returnsundefind
becauseframe.toBuffer()
returnsundefined
.