contentlayerdev / contentlayerdev/next-contentlayer-example

Example does not run on vercel edge?

オープン
#23 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
TypeScript
スター
104
フォーク
37
PR マージ指標
30日以内にマージされた PR はありません

説明

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?

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

リンクされている next-contentlayer-example リポジトリをクローンし、報告された設定 `runtime = 'edge'` をページに適用して、EvalError を再現するために Vercel にデプロイします。Edge と Node.js のデプロイを比較します。作業は、例が Edge runtime で正常にデプロイおよび実行されるか、制限と回避策が文書化された時点で完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
nextjs, typescript
領域
backend, cloud
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。