getsentry / getsentry/sentry-javascript
Update Sentry Example Page (auto-added in CLI) to work with cache components
- Langage dominant
- TypeScript
- Étoiles
- 8.7k
- Forks
- 1.8k
- Merge moyen
- 1 j 17 h
- PR mergées (30 j)
- 523
Description
`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.
```
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- nextjs, typescript
- Domaine
- api, cli
- Type d'issue
- Bug
- Difficulté
- 2/5
- Temps estimé
- 1-3 heures
- Activité
- Active
- Clarté
- Clairement spécifiée
- Accessibilité débutants
- 75/100