DjDeveloperr/deno-canvas

deploy sample(example/deploy.jsx) doesn't work

K-REBO opened this issue · 1 comments

I want to use canvas for generating image.
My code does'nt work, so test the example and it failed too.

env

Deploy ver: deno deploy beta 3
example: example/deploy.jsx
deploy playground page: https://dash.deno.com/playground/share-weasel-79
result url: https://share-weasel-79.deno.dev/

result
playground page

log

21:51:01

isolate start time: 828714 us

21:51:03

EvalError: Code generation from strings disallowed for this context
    at new Function (<anonymous>)
    at Qb (https://deno.land/x/canvas@v1.3.0/src/lib.js:3977:17)
    at Rb (https://deno.land/x/canvas@v1.3.0/src/lib.js:3985:15)
    at Module.<anonymous> (https://deno.land/x/canvas@v1.3.0/src/lib.js:5090:30)
    at init (https://deno.land/x/canvas@v1.3.0/src/canvaskit.ts:6:22)
    at init (https://deno.land/x/canvas@v1.3.0/src/canvas.ts:6:20)
    at https://deno.land/x/canvas@v1.3.0/mod.ts:2:22

I fix the canvas source path(../src/canvas.ts -> https://deno.land/x/canvas@v1.3.0/mod.ts)

please tell me why?

deno-canvas cannot work in Deno Deploy. That example exists because I have tried to get it to work in the past but no luck. First issue I hit is the code generation (which exists for performance reasons), even after fixing that, Deploy has limits on CPU time and maximum memory which program can use, making it impossible for this module to run there.