Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Example does not run on vercel edge?

Open
#23 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
nextjs, typescript
Domain
backend, cloud

Research direction

Clone the linked next-contentlayer-example repository, apply the reported runtime = 'edge' setting to the pages, and deploy it to Vercel to reproduce the EvalError. Compare the Edge and Node.js deployments; the work is done when the example deploys and runs successfully on the Edge runtime or the limitation and workaround are documented.

Written by the indexing model from the issue text.

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

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

Is there a workaround for this?

Dominant language
TypeScript
Stars
104
Forks
37
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from contentlayerdev/next-contentlayer-example

All issues in contentlayerdev/next-contentlayer-example

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.