contentlayerdev / contentlayerdev/next-contentlayer-example

Example does not run on vercel edge?

Open
#23 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
104
Forks
37
PR merge metrics
No merged PRs in 30d

Description

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?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.