Skip to content

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

Description

@s1gr1d

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 <unknown> (./app/api/sentry-example-api/route.ts:2:14)
[ELIFECYCLE] Command failed with exit code 1.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    javascriptPull requests that update javascript code

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions