Skip to content

fix(docs): update broken dynamic rendering link across codebase (#80696) #80781

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: canary
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions packages/next/errors.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"4": "Invariant: routeModule should be configured when rendering pages",
"5": "[internal]",
"6": "Invariant: logErrorWithOriginalStack can only be called on the development server",
"7": "Route %s used \"%s\" during render which is unsupported. To ensure revalidation is performed consistently it must always happen outside of renders and cached functions. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering",
"7": "Route %s used \"%s\" during render which is unsupported. To ensure revalidation is performed consistently it must always happen outside of renders and cached functions. See more info here: https://nextjs.org/docs/app/building-your-application/rendering#dynamic-rendering",
"8": "No 'cssModules' option was found for the next-flight-css-loader plugin.",
"9": "Invariant: Unexpected template variable %s",
"10": "The router state header was sent but could not be parsed.",
Expand Down Expand Up @@ -179,7 +179,7 @@
"178": "Route %s used \"%s\" inside \"use cache\". Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use \"%s\" outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache",
"179": "Invalid revalidate value \"%s\" on \"%s\", must be a non-negative number or false",
"180": "failed to pipe response",
"181": "Route %s used \"%s\" inside a \"use cache\" which is unsupported. To ensure revalidation is performed consistently it must always happen outside of renders and cached functions. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering",
"181": "Route %s used \"%s\" inside a \"use cache\" which is unsupported. To ensure revalidation is performed consistently it must always happen outside of renders and cached functions. See more info here: https://nextjs.org/docs/app/building-your-application/rendering#dynamic-rendering",
"182": "Invalid URL",
"183": "ImageResponse moved from \"next/server\" to \"next/og\" since Next.js 14, please import from \"next/og\" instead",
"184": "Dynamic WASM code generation (e. g. 'WebAssembly.compile') not allowed in Edge Runtime.\nLearn More: https://nextjs.org/docs/messages/edge-dynamic-code-evaluation",
Expand Down Expand Up @@ -304,7 +304,7 @@
"303": "Route name should start with a \"/\", got \"%s\"",
"304": "Route %s used \"headers\" inside \"use cache\". Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use \"headers\" outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache",
"305": "Invariant: expected a page response, got %s",
"306": "Route %s used \"%s\" inside a function cached with \"unstable_cache(...)\" which is unsupported. To ensure revalidation is performed consistently it must always happen outside of renders and cached functions. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering",
"306": "Route %s used \"%s\" inside a function cached with \"unstable_cache(...)\" which is unsupported. To ensure revalidation is performed consistently it must always happen outside of renders and cached functions. See more info here: https://nextjs.org/docs/app/building-your-application/rendering#dynamic-rendering",
"307": "%sused %s. \\`params\\` should be awaited before using its properties. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis",
"308": "The stale option must be a number of seconds.",
"309": "Build failed because of webpack errors",
Expand Down Expand Up @@ -523,7 +523,7 @@
"522": "Invariant: did not expect response writer to be written to for upgrade request",
"523": "generateDynamicFlightRenderResult should never be called in `next start` mode.",
"524": "Expected the \"use cache\" function %s to receive its encrypted bound arguments as the first argument.",
"525": "Route %s with \\`dynamic = \"error\"\\` couldn't be rendered statically because it used \\`headers\\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering",
"525": "Route %s with \\`dynamic = \"error\"\\` couldn't be rendered statically because it used \\`headers\\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering#dynamic-rendering",
"526": "Unknown expression type in abortOnSynchronousPlatformIOAccess.",
"527": "Page with \\`dynamic = \"force-dynamic\"\\` couldn't be exported. \\`output: \"export\"\\` requires all pages be renderable statically because there is no runtime server to dynamically render routes in this output format. Learn more: https://nextjs.org/docs/app/building-your-application/deploying/static-exports",
"528": "failed to decode param",
Expand All @@ -541,17 +541,17 @@
"540": "createInternalWaitUntil should never be called in minimal mode",
"541": "PhasedStream expected more phases to release but none were found.",
"542": "\"next/font\" requires SWC although Babel is being used due to a custom babel config being present.\\nRead more: https://nextjs.org/docs/messages/babel-font-loader-conflict",
"543": "Route %s with \\`dynamic = \"error\"\\` couldn't be rendered statically because it used %s. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering",
"543": "Route %s with \\`dynamic = \"error\"\\` couldn't be rendered statically because it used %s. See more info here: https://nextjs.org/docs/app/building-your-application/rendering#dynamic-rendering",
"544": "experimental.ppr",
"545": "unexpected input %s",
"546": "Native module not found: %s",
"547": "Missing workStore in AfterContext.runCallbacks",
"548": "The 'static' directory is reserved in Next.js and can not be used as the export out directory. https://nextjs.org/docs/messages/can-not-output-to-static",
"549": "Route %s with \\`dynamic = \"error\"\\` couldn't be rendered statically because it used \\`cookies\\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering",
"549": "Route %s with \\`dynamic = \"error\"\\` couldn't be rendered statically because it used \\`cookies\\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering#dynamic-rendering",
"550": "Route %s couldn't be rendered statically because it used %s. See more info here: https://nextjs.org/docs/messages/dynamic-server-error",
"551": "experimental.turbo.unstablePersistentCaching",
"552": "%s\n\n%s\n\n\\t%s\n\n%s\n",
"553": "Route %s with \\`dynamic = \"error\"\\` couldn't be rendered statically because it used \\`%s\\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering",
"553": "Route %s with \\`dynamic = \"error\"\\` couldn't be rendered statically because it used \\`%s\\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering#dynamic-rendering",
"554": "%s requires options.context to be an Element",
"555": "Using \\`export * from '...'\\` in a page is disallowed. Please use \\`export { default } from '...'\\` instead.\\nRead more: https://nextjs.org/docs/messages/export-all-in-page",
"556": "`createRenderResumeDataCache` should not be called in edge runtime.",
Expand All @@ -560,7 +560,7 @@
"559": "Expected the \"use cache\" function %s to receive %s bound arguments, got %s instead.",
"560": "[%s]: options.implementation.transformCss must be an 'lightningcss' transform function. Received %s",
"561": "[LightningCssMinifyPlugin]: implementation.transformCss must be an 'lightningcss' transform function. Received %s",
"562": "Route %s with \\`dynamic = \"error\"\\` couldn't be rendered statically because it used \\`connection\\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering",
"562": "Route %s with \\`dynamic = \"error\"\\` couldn't be rendered statically because it used \\`connection\\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering#dynamic-rendering",
"563": "Cannot call waitUntil() on an AwaiterOnce that was already awaited",
"564": "Expected workStore to exist when handling searchParams in a client Page.",
"565": "Expected \\`moduleId\\` to be of type \\`string\\`, got \\`%s\\`",
Expand All @@ -574,7 +574,7 @@
"573": "Route \"%s\" has a \\`generateViewport\\` that could not finish rendering before %s was used. Follow the instructions in the error for this expression to resolve.",
"574": "PhasedStream expected at least one phase but none were found.",
"575": "Route %s with \\`dynamic = \"error\"\\` couldn't be rendered statically because it used \\`nextUrl.%s\\`.",
"576": "Route %s couldn't be rendered statically because it used %s. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering",
"576": "Route %s couldn't be rendered statically because it used %s. See more info here: https://nextjs.org/docs/app/building-your-application/rendering#dynamic-rendering",
"577": "Route %s couldn't be rendered statically because it used a dynamic API. See more info here: https://nextjs.org/docs/messages/dynamic-server-error",
"578": "util/compare-position#getParentComparator required either options.parent or options.element",
"579": "No cached response",
Expand Down
2 changes: 1 addition & 1 deletion packages/next/src/server/app-render/dynamic-rendering.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export function markCurrentScopeAsDynamic(

if (store.dynamicShouldError) {
throw new StaticGenBailoutError(
`Route ${store.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${expression}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`
`Route ${store.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${expression}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering#dynamic-rendering`
)
}

Expand Down
2 changes: 1 addition & 1 deletion packages/next/src/server/request/connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export function connection(): Promise<void> {
}
if (workStore.dynamicShouldError) {
throw new StaticGenBailoutError(
`Route ${workStore.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`connection\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`
`Route ${workStore.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`connection\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering#dynamic-rendering`
)
}

Expand Down
2 changes: 1 addition & 1 deletion packages/next/src/server/request/cookies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export function cookies(): Promise<ReadonlyRequestCookies> {
}
if (workStore.dynamicShouldError) {
throw new StaticGenBailoutError(
`Route ${workStore.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`cookies\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`
`Route ${workStore.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`cookies\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering#dynamic-rendering`
)
}

Expand Down
2 changes: 1 addition & 1 deletion packages/next/src/server/request/draft-mode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ function trackDynamicDraftMode(expression: string) {

if (store.dynamicShouldError) {
throw new StaticGenBailoutError(
`Route ${store.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${expression}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`
`Route ${store.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${expression}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering#dynamic-rendering`
)
}

Expand Down
2 changes: 1 addition & 1 deletion packages/next/src/server/request/headers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export function headers(): Promise<ReadonlyHeaders> {
}
if (workStore.dynamicShouldError) {
throw new StaticGenBailoutError(
`Route ${workStore.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`headers\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`
`Route ${workStore.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`headers\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering#dynamic-rendering`
)
}

Expand Down
4 changes: 2 additions & 2 deletions packages/next/src/server/request/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export function throwWithStaticGenerationBailoutError(
expression: string
): never {
throw new StaticGenBailoutError(
`Route ${route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`
`Route ${route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering#dynamic-rendering`
)
}

Expand All @@ -16,7 +16,7 @@ export function throwWithStaticGenerationBailoutErrorWithDynamicError(
expression: string
): never {
throw new StaticGenBailoutError(
`Route ${route} with \`dynamic = "error"\` couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`
`Route ${route} with \`dynamic = "error"\` couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering#dynamic-rendering`
)
}

Expand Down
2 changes: 1 addition & 1 deletion packages/next/src/server/route-modules/app-route/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1165,7 +1165,7 @@ function trackDynamic(

if (store.dynamicShouldError) {
throw new StaticGenBailoutError(
`Route ${store.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${expression}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`
`Route ${store.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${expression}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering#dynamic-rendering`
)
}

Expand Down
6 changes: 3 additions & 3 deletions packages/next/src/server/web/spec-extension/revalidate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,16 +95,16 @@ function revalidate(tags: string[], expression: string) {
if (workUnitStore) {
if (workUnitStore.type === 'cache') {
throw new Error(
`Route ${store.route} used "${expression}" inside a "use cache" which is unsupported. To ensure revalidation is performed consistently it must always happen outside of renders and cached functions. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`
`Route ${store.route} used "${expression}" inside a "use cache" which is unsupported. To ensure revalidation is performed consistently it must always happen outside of renders and cached functions. See more info here: https://nextjs.org/docs/app/building-your-application/rendering#dynamic-rendering`
)
} else if (workUnitStore.type === 'unstable-cache') {
throw new Error(
`Route ${store.route} used "${expression}" inside a function cached with "unstable_cache(...)" which is unsupported. To ensure revalidation is performed consistently it must always happen outside of renders and cached functions. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`
`Route ${store.route} used "${expression}" inside a function cached with "unstable_cache(...)" which is unsupported. To ensure revalidation is performed consistently it must always happen outside of renders and cached functions. See more info here: https://nextjs.org/docs/app/building-your-application/rendering#dynamic-rendering`
)
}
if (workUnitStore.phase === 'render') {
throw new Error(
`Route ${store.route} used "${expression}" during render which is unsupported. To ensure revalidation is performed consistently it must always happen outside of renders and cached functions. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`
`Route ${store.route} used "${expression}" during render which is unsupported. To ensure revalidation is performed consistently it must always happen outside of renders and cached functions. See more info here: https://nextjs.org/docs/app/building-your-application/rendering#dynamic-rendering`
)
}

Expand Down
2 changes: 1 addition & 1 deletion test/development/app-dir/dynamic-error-trace/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe('app dir - dynamic error trace', () => {
// TODO(veil): Where is the stackframe for app/page.js?
await expect(browser).toDisplayRedbox(`
{
"description": "Route / with \`dynamic = "error"\` couldn't be rendered statically because it used \`headers\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering",
"description": "Route / with \`dynamic = "error"\` couldn't be rendered statically because it used \`headers\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering#dynamic-rendering",
"environmentLabel": "Server",
"label": "Runtime Error",
"source": "app/lib.js (4:13) @ Foo
Expand Down
Loading
Loading