Reputation: 514
I was looking for a library compatible with the web's Canvas API that I could use with Cloudflare Workers and found canvaskit-wasm.
However, when I try to use it, I am stuck with the error Cannot read properties of undefined (reading 'href')
.
Minimum reproduction method:
src/server.js
import CanvasKitInit from "canvaskit-wasm";
import { Hono } from "hono";
const app = new Hono();
const CanvasKit = await CanvasKitInit();
app.get("/", (c) => c.text("Hello!"));
export default app;
wrangler.toml
name = "canvaskit-test"
main = "src/server.js"
compatibility_date = "2022-07-12"
node_compat = true
Upvotes: 2
Views: 197