Skip to content
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

Error using Edge Functions #306

Closed
wei opened this issue Nov 13, 2022 · 1 comment
Closed

Error using Edge Functions #306

wei opened this issue Nov 13, 2022 · 1 comment

Comments

@wei
Copy link
Contributor

wei commented Nov 13, 2022

Bug report

Description / Observed Behavior

Unable to use Satori with edge functions.

Expected Behavior

Satori should work when edge functions.

Reproduction

  1. I created a new repo from Open Graph Image Generation template.
  2. /api/custom-font works great with @vercel/og.
  3. I created a new route pages/api/satori-custom-font.tsx the only changes from api/custom-font is replacing @vercel/og with satori. See wei/satori-edge-function-issue@766b96d.
  4. Going to /api/satori-custom-font errors out

image

Build also fails:
image

Additional Context

Satori version, and any other context about the problem here.
satori@^0.0.44

@wei
Copy link
Contributor Author

wei commented Nov 16, 2022

I was able to resolve it in wei/satori-edge-function-issue@64a073f

One gotcha is that the Runtime and WASM instructions only work for yoga-wasm-web@0.1.2. Adapted from @vercel/og sourcemap.

@wei wei closed this as completed Nov 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant