contentlayerdev / contentlayerdev/next-contentlayer-example

Example does not run on vercel edge?

Offen
#23 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
TypeScript
Sterne
104
Forks
37
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Here is the repo:
https://github.com/yongyi520/contentlayer-example

I have cloned this repo and simply added
`export const runtime = 'edge' // 'nodejs' (default) | 'edge'`

on all pages

When I tried to deploy it to vercel, I got this issue:
**EvalError: Code generation from strings disallowed for this context**
![Screenshot 2023-09-09 at 14 31 39](https://github.com/contentlayerdev/next-contentlayer-example/assets/10789851/1c8752d9-8842-4473-a427-7b18db36531a)

Everything works fine on nodejs serverless, but when it's on edge it throws error somehow

Is there a workaround for this?

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.