x Route segment config "runtime" is not compatible with `nextConfig.cacheComponents`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#dynamic--force-dynamic
x Route segment config "runtime" is not compatible with `nextConfig.cacheComponents`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#migrating-route-segment-configs
,-[input.js:1:1]
,-[input.js:1:1]
1 | export const runtime = 'edge'
1 | export const runtime = 'edge'
: ^^^^^^^
: ^^^^^^^
2 | export const dynamic = 'force-dynamic'
2 | export const dynamic = 'force-dynamic'
`----
`----
x Route segment config "dynamic" is not compatible with `nextConfig.cacheComponents`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#dynamic--force-dynamic
x Route segment config "dynamic" is not compatible with `nextConfig.cacheComponents`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#migrating-route-segment-configs
,-[input.js:2:1]
,-[input.js:2:1]
1 | export const runtime = 'edge'
1 | export const runtime = 'edge'
2 | export const dynamic = 'force-dynamic'
2 | export const dynamic = 'force-dynamic'
: ^^^^^^^
: ^^^^^^^
3 | export const dynamicParams = false
3 | export const dynamicParams = false
`----
`----
x Route segment config "dynamicParams" is not compatible with `nextConfig.cacheComponents`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#dynamic--force-dynamic
x Route segment config "dynamicParams" is not compatible with `nextConfig.cacheComponents`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#migrating-route-segment-configs
,-[input.js:3:1]
,-[input.js:3:1]
2 | export const dynamic = 'force-dynamic'
2 | export const dynamic = 'force-dynamic'
3 | export const dynamicParams = false
3 | export const dynamicParams = false
: ^^^^^^^^^^^^^
: ^^^^^^^^^^^^^
4 | export const fetchCache = 'force-no-store'
4 | export const fetchCache = 'force-no-store'
`----
`----
x Route segment config "fetchCache" is not compatible with `nextConfig.cacheComponents`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#dynamic--force-dynamic
x Route segment config "fetchCache" is not compatible with `nextConfig.cacheComponents`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#migrating-route-segment-configs
,-[input.js:4:1]
,-[input.js:4:1]
3 | export const dynamicParams = false
3 | export const dynamicParams = false
4 | export const fetchCache = 'force-no-store'
4 | export const fetchCache = 'force-no-store'
: ^^^^^^^^^^
: ^^^^^^^^^^
5 | export const revalidate = 1
5 | export const revalidate = 1
`----
`----
x Route segment config "revalidate" is not compatible with `nextConfig.cacheComponents`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#dynamic--force-dynamic
x Route segment config "revalidate" is not compatible with `nextConfig.cacheComponents`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#migrating-route-segment-configs
x Route segment config "runtime" is not compatible with `nextConfig.experimental.useCache`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#dynamic--force-dynamic
x Route segment config "runtime" is not compatible with `nextConfig.experimental.useCache`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#migrating-route-segment-configs
"description": " ╰─▶ × Error: x Route segment config "revalidate" is not compatible with \`nextConfig.cacheComponents\`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#dynamic--force-dynamic",
"description": " ╰─▶ × Error: x Route segment config "revalidate" is not compatible with \`nextConfig.cacheComponents\`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#migrating-route-segment-configs",
"environmentLabel": null,
"environmentLabel": null,
"label": "Build Error",
"label": "Build Error",
"source": "./app/page.tsx
"source": "./app/page.tsx
╰─▶ × Error: x Route segment config "revalidate" is not compatible with \`nextConfig.cacheComponents\`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#dynamic--force-dynamic
╰─▶ × Error: x Route segment config "revalidate" is not compatible with \`nextConfig.cacheComponents\`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#migrating-route-segment-configs
"description": " x Route segment config "revalidate" is not compatible with \`nextConfig.cacheComponents\`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#dynamic--force-dynamic",
"description": " x Route segment config "revalidate" is not compatible with \`nextConfig.cacheComponents\`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#migrating-route-segment-configs",
"environmentLabel": null,
"environmentLabel": null,
"label": "Build Error",
"label": "Build Error",
"source": "./app/page.tsx
"source": "./app/page.tsx
Error: x Route segment config "revalidate" is not compatible with \`nextConfig.cacheComponents\`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#dynamic--force-dynamic
Error: x Route segment config "revalidate" is not compatible with \`nextConfig.cacheComponents\`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#migrating-route-segment-configs
`" x Route segment config "dynamic" is not compatible with \`nextConfig.cacheComponents\`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#dynamic--force-dynamic"`
`" x Route segment config "dynamic" is not compatible with \`nextConfig.cacheComponents\`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#migrating-route-segment-configs"`
)
)
}
}
expect(redbox.source).toContain(
expect(redbox.source).toContain(
'"dynamic" is not compatible with `nextConfig.cacheComponents`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#dynamic--force-dynamic'
'"dynamic" is not compatible with `nextConfig.cacheComponents`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#migrating-route-segment-configs'
)
)
}else{
}else{
// In build mode, check for all three errors in the output
// In build mode, check for all three errors in the output
'"dynamic" is not compatible with `nextConfig.cacheComponents`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#dynamic--force-dynamic'
'"dynamic" is not compatible with `nextConfig.cacheComponents`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#migrating-route-segment-configs'
'"revalidate" is not compatible with `nextConfig.cacheComponents`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#dynamic--force-dynamic'
'"revalidate" is not compatible with `nextConfig.cacheComponents`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#migrating-route-segment-configs'
'"fetchCache" is not compatible with `nextConfig.cacheComponents`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#dynamic--force-dynamic'
'"fetchCache" is not compatible with `nextConfig.cacheComponents`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#migrating-route-segment-configs'
@@ -54,7 +54,7 @@ function filterBrowserLogs(output: string): string {
...
@@ -54,7 +54,7 @@ function filterBrowserLogs(output: string): string {
3 | export default function Page() {
3 | export default function Page() {
4 | return <div>Test page under app/</div>
4 | return <div>Test page under app/</div>
Route segment config "runtime" is not compatible with \`nextConfig.cacheComponents\`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#dynamic--force-dynamic"
Route segment config "runtime" is not compatible with \`nextConfig.cacheComponents\`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#migrating-route-segment-configs"
`)
`)
// Count occurrences of the layout error at the specific location
// Count occurrences of the layout error at the specific location
// Filter out browser logs to avoid counting forwarded browser errors
// Filter out browser logs to avoid counting forwarded browser errors
...
@@ -69,10 +69,10 @@ function filterBrowserLogs(output: string): string {
...
@@ -69,10 +69,10 @@ function filterBrowserLogs(output: string): string {
'"dynamic" is not compatible with `nextConfig.cacheComponents`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#dynamic--force-dynamic'
'"dynamic" is not compatible with `nextConfig.cacheComponents`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#migrating-route-segment-configs'
)
)
expect(next.cliOutput).toContain(
expect(next.cliOutput).toContain(
'"runtime" is not compatible with `nextConfig.cacheComponents`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#dynamic--force-dynamic'
'"runtime" is not compatible with `nextConfig.cacheComponents`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#migrating-route-segment-configs'
)
)
// Count occurrences of the layout error at the specific location
// Count occurrences of the layout error at the specific location
`" x Route segment config "revalidate" is not compatible with \`nextConfig.cacheComponents\`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#dynamic--force-dynamic"`
`" x Route segment config "revalidate" is not compatible with \`nextConfig.cacheComponents\`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#migrating-route-segment-configs"`
)
)
}
}
expect(redbox.source).toContain(
expect(redbox.source).toContain(
'"revalidate" is not compatible with `nextConfig.cacheComponents`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#dynamic--force-dynamic'
'"revalidate" is not compatible with `nextConfig.cacheComponents`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#migrating-route-segment-configs'
'"dynamicParams" is not compatible with `nextConfig.cacheComponents`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#dynamic--force-dynamic'
'"dynamicParams" is not compatible with `nextConfig.cacheComponents`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#migrating-route-segment-configs'
'"dynamic" is not compatible with `nextConfig.cacheComponents`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#dynamic--force-dynamic'
'"dynamic" is not compatible with `nextConfig.cacheComponents`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#migrating-route-segment-configs'
'"fetchCache" is not compatible with `nextConfig.cacheComponents`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#dynamic--force-dynamic'
'"fetchCache" is not compatible with `nextConfig.cacheComponents`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#migrating-route-segment-configs'
'"revalidate" is not compatible with `nextConfig.cacheComponents`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#dynamic--force-dynamic'
'"revalidate" is not compatible with `nextConfig.cacheComponents`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#migrating-route-segment-configs'
`" x Route segment config "runtime" is not compatible with \`nextConfig.cacheComponents\`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#dynamic--force-dynamic"`
`" x Route segment config "runtime" is not compatible with \`nextConfig.cacheComponents\`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#migrating-route-segment-configs"`
)
)
}
}
expect(redbox.source).toContain(
expect(redbox.source).toContain(
'"runtime" is not compatible with `nextConfig.cacheComponents`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#dynamic--force-dynamic'
'"runtime" is not compatible with `nextConfig.cacheComponents`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#migrating-route-segment-configs'
)
)
}else{
}else{
awaitretry(async()=>{
awaitretry(async()=>{
expect(next.cliOutput).toContain(
expect(next.cliOutput).toContain(
'"runtime" is not compatible with `nextConfig.cacheComponents`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#dynamic--force-dynamic'
'"runtime" is not compatible with `nextConfig.cacheComponents`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#migrating-route-segment-configs'
)
)
// the stack trace is different between turbopack/webpack
// the stack trace is different between turbopack/webpack
"description": " ╰─▶ × Error: x Route segment config "runtime" is not compatible with \`nextConfig.experimental.useCache\`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#dynamic--force-dynamic",
"description": " ╰─▶ × Error: x Route segment config "runtime" is not compatible with \`nextConfig.experimental.useCache\`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#migrating-route-segment-configs",
"environmentLabel": null,
"environmentLabel": null,
"label": "Build Error",
"label": "Build Error",
"source": "<FIXME-nextjs-internal-source>
"source": "<FIXME-nextjs-internal-source>
╰─▶ × Error: x Route segment config "runtime" is not compatible with \`nextConfig.experimental.useCache\`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#dynamic--force-dynamic
╰─▶ × Error: x Route segment config "runtime" is not compatible with \`nextConfig.experimental.useCache\`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#migrating-route-segment-configs
// FIXME: Fix broken import trace for Webpack loader resource.
// FIXME: Fix broken import trace for Webpack loader resource.
awaitexpect(browser).toDisplayRedbox(`
awaitexpect(browser).toDisplayRedbox(`
{
{
"description": " x Route segment config "runtime" is not compatible with \`nextConfig.experimental.useCache\`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#dynamic--force-dynamic",
"description": " x Route segment config "runtime" is not compatible with \`nextConfig.experimental.useCache\`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#migrating-route-segment-configs",
"environmentLabel": null,
"environmentLabel": null,
"label": "Build Error",
"label": "Build Error",
"source": "<FIXME-nextjs-internal-source>
"source": "<FIXME-nextjs-internal-source>
Error: x Route segment config "runtime" is not compatible with \`nextConfig.experimental.useCache\`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#dynamic--force-dynamic
Error: x Route segment config "runtime" is not compatible with \`nextConfig.experimental.useCache\`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#migrating-route-segment-configs
Route segment config "runtime" is not compatible with \`nextConfig.experimental.useCache\`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#dynamic--force-dynamic
Route segment config "runtime" is not compatible with \`nextConfig.experimental.useCache\`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#migrating-route-segment-configs
// TODO(veil): Fix broken import trace for Webpack loader resource.
// TODO(veil): Fix broken import trace for Webpack loader resource.
╰─▶ × Error: x Route segment config "runtime" is not compatible with \`nextConfig.experimental.useCache\`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#dynamic--force-dynamic
╰─▶ × Error: x Route segment config "runtime" is not compatible with \`nextConfig.experimental.useCache\`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#migrating-route-segment-configs
// TODO(veil): Fix broken import trace for Webpack loader resource.
// TODO(veil): Fix broken import trace for Webpack loader resource.
Error: x Route segment config "runtime" is not compatible with \`nextConfig.experimental.useCache\`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#dynamic--force-dynamic
Error: x Route segment config "runtime" is not compatible with \`nextConfig.experimental.useCache\`. Please remove it. Learn more: https://nextjs.org/docs/app/getting-started/cache-components#migrating-route-segment-configs