getsentry / getsentry/sentry-javascript

Update Sentry Example Page (auto-added in CLI) to work with cache components

オープン 初心者向け
#24,200 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
javascript
主要言語
TypeScript
スター
8.7k
フォーク
1.8k
平均マージ
1日 17時間
マージ済み PR(30日)
523

説明

`dymanic` is not allowed with cache components and currently our added example page throws this error:

```
./app/api/sentry-example-api/route.ts:2:14
Error: Route segment config "dynamic" is not compatible with `nextConfig.cacheComponents`. Please remove it.
1 | import * as Sentry from "@sentry/nextjs";
> 2 | export const dynamic = "force-dynamic";
| ^^^^^^^
3 |
4 | class SentryExampleAPIError extends Error {
5 | constructor(message: string | undefined) {

Ecmascript file had an error

at (./app/api/sentry-example-api/route.ts:2:14)
[ELIFECYCLE] Command failed with exit code 1.
```

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

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

調査の方向性

Start with the generated app/api/sentry-example-api/route.ts and reproduce the failure with nextConfig.cacheComponents enabled. Then find the CLI template that creates this example page and verify the generated route builds successfully without the reported route-segment configuration error.

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

評価

技術スタック
nextjs, typescript
領域
api, cli
issue の種類
バグ
難易度
2/5
見積もり時間
1〜3時間
活発さ
活発
明瞭さ
明確に書かれている
初心者へのやさしさ
75/100

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

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