Skip to content
Merged
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
2 changes: 1 addition & 1 deletion docs/02-pages/02-guides/upgrading/version-12.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Next.js now uses the Rust-based compiler [SWC](https://swc.rs/) to compile JavaS

Next.js provides full backward compatibility with applications that have [custom Babel configuration](/docs/pages/guides/babel). All transformations that Next.js handles by default like styled-jsx and tree-shaking of `getStaticProps` / `getStaticPaths` / `getServerSideProps` have been ported to Rust.

When an application has a custom Babel configuration, Next.js will automatically opt-out of using SWC for compiling JavaScript/Typescript and will fall back to using Babel in the same way that it was used in Next.js 11.
When an application has a custom Babel configuration, Next.js will automatically opt-out of using SWC for compiling JavaScript/TypeScript and will fall back to using Babel in the same way that it was used in Next.js 11.

Many of the integrations with external libraries that currently require custom Babel transformations will be ported to Rust-based SWC transforms in the near future. These include but are not limited to:

Expand Down
2 changes: 0 additions & 2 deletions docs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ related:
- app/getting-started
---

{/* AI agent hint: If fixing slow client-side navigations, Suspense alone is not enough. You must also export `unstable_instant` from the route. Read docs/01-app/02-guides/instant-navigation.mdx before making changes. */}

Welcome to the Next.js documentation!

## What is Next.js?
Expand Down
4 changes: 2 additions & 2 deletions errors/import-esm-externals.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ title: ESM packages need to be imported

## Why This Error Occurred

Packages in node_modules that are published as EcmaScript Module, need to be `import`ed via `import ... from 'package'` or `import('package')`.
Packages in node_modules that are published as ECMAScript Module, need to be `import`ed via `import ... from 'package'` or `import('package')`.

You get this error when using a different way to reference the package, e. g. `require()`.
You get this error when using a different way to reference the package, e.g. `require()`.

## Possible Ways to Fix It

Expand Down
2 changes: 1 addition & 1 deletion errors/middleware-upgrade-guide.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ export default async function handler(req: NextRequest) {

### Explanation

Based on beta feedback, we are changing the Cookies API in `NextRequest` and `NextResponse` to align more to a `get`/`set` model. The `Cookies` API extends Map, including methods like [entries](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map/entries) and [values](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map/entries).
Based on beta feedback, we are changing the Cookies API in `NextRequest` and `NextResponse` to align more to a `get`/`set` model. The `Cookies` API extends Map, including methods like [entries](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map/entries) and [values](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map/values).

### How to upgrade

Expand Down
2 changes: 1 addition & 1 deletion errors/next-prerender-sync-params.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default async function ComponentThatWillBeExportedAsPage({ params, search
export * from '.../some-file'
```

It is unexpected that you would run the codemod and not successfully convert all instances of `params` and `searchParams` to async or have a marker string to help you locate unconverted cases. If you do find yourself in this situation please report this to [Next.js on Github](https://github.com/vercel/next.js/issues).
It is unexpected that you would run the codemod and not successfully convert all instances of `params` and `searchParams` to async or have a marker string to help you locate unconverted cases. If you do find yourself in this situation please report this to [Next.js on GitHub](https://github.com/vercel/next.js/issues).

## Useful Links

Expand Down
2 changes: 1 addition & 1 deletion errors/next-prerender-sync-request.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default async function GET(request) {
}
```

It is unexpected that you would run the codemod and not successfully convert all instances of `params` and `searchParams` to async or have a marker string to help you locate unconverted cases. If you do find yourself in this situation please report this to [Next.js on Github](https://github.com/vercel/next.js/issues).
It is unexpected that you would run the codemod and not successfully convert all instances of `params` and `searchParams` to async or have a marker string to help you locate unconverted cases. If you do find yourself in this situation please report this to [Next.js on GitHub](https://github.com/vercel/next.js/issues).

## Useful Links

Expand Down
2 changes: 1 addition & 1 deletion errors/swc-disabled.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Next.js now uses Rust-based compiler [SWC](https://swc.rs/) to compile JavaScrip

Next.js provides full backwards compatibility with applications that have [custom Babel configuration](/docs/pages/guides/babel). All transformations that Next.js handles by default like styled-jsx and tree-shaking of `getStaticProps` / `getStaticPaths` / `getServerSideProps` have been ported to Rust.

When an application has custom Babel configuration Next.js will automatically opt-out of using SWC for compiling JavaScript/Typescript and will fall back to using Babel in the same way that it was used in Next.js 11.
When an application has custom Babel configuration Next.js will automatically opt-out of using SWC for compiling JavaScript/TypeScript and will fall back to using Babel in the same way that it was used in Next.js 11.

Many of the integrations with external libraries that currently require custom Babel transformations will be ported to Rust-based SWC transforms in the near future. These include but are not limited to:

Expand Down
35 changes: 18 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"lint-ast-grep": "ast-grep scan",
"lint-no-typescript": "cross-env NODE_OPTIONS=\"--max-old-space-size=8192\" run-p prettier-check \"lint-eslint .\" lint-language",
"types-and-precompiled": "run-p \"lint-typescript --log-order=stream\" check-compiler-fixtures types:test-lib && pnpm check-precompiled",
"check-compiler-fixtures": "find crates/next-custom-transforms/tests/fixture -type f -name 'tsconfig.json' -print0 | xargs --null -n1 -I'{}' pnpm tsc --noEmit --project '{}'",
"check-compiler-fixtures": "find crates/next-custom-transforms/tests/fixture -type f -name 'tsconfig.json' -print0 | xargs --null -I'{}' pnpm tsc --noEmit --project '{}'",
"validate-externals-doc": "node ./scripts/validate-externals-doc.js",
"check-unused-turbo-tasks": "node scripts/check-unused-turbo-tasks.mjs",
"lint": "run-p test-types lint-typescript prettier-check \"lint-eslint .\" lint-ast-grep lint-language check-unused-turbo-tasks",
Expand Down Expand Up @@ -258,16 +258,16 @@
"pretty-ms": "7.0.0",
"random-seed": "0.3.0",
"react": "19.0.0",
"react-builtin": "npm:react@19.3.0-canary-dd453071-20260506",
"react-builtin": "npm:react@19.3.0-canary-d5736f09-20260507",
"react-dom": "19.0.0",
"react-dom-builtin": "npm:react-dom@19.3.0-canary-dd453071-20260506",
"react-dom-experimental-builtin": "npm:react-dom@0.0.0-experimental-dd453071-20260506",
"react-experimental-builtin": "npm:react@0.0.0-experimental-dd453071-20260506",
"react-is-builtin": "npm:react-is@19.3.0-canary-dd453071-20260506",
"react-server-dom-turbopack": "npm:react-server-dom-turbopack@19.3.0-canary-dd453071-20260506",
"react-server-dom-turbopack-experimental": "npm:react-server-dom-turbopack@0.0.0-experimental-dd453071-20260506",
"react-server-dom-webpack": "npm:react-server-dom-webpack@19.3.0-canary-dd453071-20260506",
"react-server-dom-webpack-experimental": "npm:react-server-dom-webpack@0.0.0-experimental-dd453071-20260506",
"react-dom-builtin": "npm:react-dom@19.3.0-canary-d5736f09-20260507",
"react-dom-experimental-builtin": "npm:react-dom@0.0.0-experimental-d5736f09-20260507",
"react-experimental-builtin": "npm:react@0.0.0-experimental-d5736f09-20260507",
"react-is-builtin": "npm:react-is@19.3.0-canary-d5736f09-20260507",
"react-server-dom-turbopack": "npm:react-server-dom-turbopack@19.3.0-canary-d5736f09-20260507",
"react-server-dom-turbopack-experimental": "npm:react-server-dom-turbopack@0.0.0-experimental-d5736f09-20260507",
"react-server-dom-webpack": "npm:react-server-dom-webpack@19.3.0-canary-d5736f09-20260507",
"react-server-dom-webpack-experimental": "npm:react-server-dom-webpack@0.0.0-experimental-d5736f09-20260507",
"react-ssr-prepass": "1.0.8",
"react-virtualized": "9.22.3",
"relay-compiler": "13.0.2",
Expand All @@ -277,8 +277,8 @@
"resolve-from": "5.0.0",
"sass": "1.54.0",
"satori": "0.25.0",
"scheduler-builtin": "npm:scheduler@0.28.0-canary-dd453071-20260506",
"scheduler-experimental-builtin": "npm:scheduler@0.0.0-experimental-dd453071-20260506",
"scheduler-builtin": "npm:scheduler@0.28.0-canary-d5736f09-20260507",
"scheduler-experimental-builtin": "npm:scheduler@0.0.0-experimental-d5736f09-20260507",
"seedrandom": "3.0.5",
"semver": "7.3.7",
"serve-handler": "6.1.6",
Expand Down Expand Up @@ -322,10 +322,10 @@
"@types/react-dom": "19.2.3",
"@types/retry": "0.12.0",
"jest-snapshot": "30.0.0-alpha.6",
"react": "npm:react@19.3.0-canary-dd453071-20260506",
"react-dom": "npm:react-dom@19.3.0-canary-dd453071-20260506",
"react-is": "npm:react-is@19.3.0-canary-dd453071-20260506",
"scheduler": "npm:scheduler@0.28.0-canary-dd453071-20260506"
"react": "npm:react@19.3.0-canary-d5736f09-20260507",
"react-dom": "npm:react-dom@19.3.0-canary-d5736f09-20260507",
"react-is": "npm:react-is@19.3.0-canary-d5736f09-20260507",
"scheduler": "npm:scheduler@0.28.0-canary-d5736f09-20260507"
},
"packageExtensions": {
"eslint-plugin-react-hooks@0.0.0-experimental-6de32a5a-20250822": {
Expand All @@ -345,7 +345,8 @@
"@rspack/core@1.6.7": "patches/@rspack__core@1.6.7.patch",
"@modelcontextprotocol/sdk": "patches/@modelcontextprotocol__sdk.patch",
"@vercel/blob": "patches/@vercel__blob.patch",
"postcss-scss": "patches/postcss-scss.patch"
"postcss-scss": "patches/postcss-scss.patch",
"playwright-core@1.58.2": "patches/playwright-core@1.58.2.patch"
}
}
}
25 changes: 14 additions & 11 deletions packages/next/errors.json
Original file line number Diff line number Diff line change
Expand Up @@ -1230,15 +1230,18 @@
"1229": "Route \"%s\": Next.js encountered uncached or runtime data in \\`generateMetadata()\\`.\\n\\nThis route's metadata is blocked, but the rest of its content can be prerendered.\\n\\nWays to fix this:\\n - Use a static metadata export instead of \\`generateMetadata()\\`\\n - Cache the metadata with \\`\"use cache\"\\` in \\`generateMetadata()\\`\\n - Add a dynamic data access (e.g. \\`await connection()\\`) to the page to render it at request time\\n\\nLearn more: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata",
"1230": "Route \"%s\": Next.js encountered runtime data in \\`generateMetadata()\\`.\\n\\nThis route's metadata is blocked, but the rest of its content can be prerendered. \\`cookies()\\`, \\`headers()\\`, \\`params\\`, or \\`searchParams\\` accessed in \\`generateMetadata()\\` cause it to run dynamically.\\n\\nWays to fix this:\\n - Use a static metadata export instead of \\`generateMetadata()\\`\\n - Add a dynamic data access (e.g. \\`await connection()\\`) to the page to render it at request time\\n\\nLearn more: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata",
"1231": "Route \"%s\": Next.js encountered uncached data in \\`generateMetadata()\\`.\\n\\nThis route's metadata is blocked, but the rest of its content can be prerendered. \\`fetch(...)\\` or \\`connection()\\` accessed in \\`generateMetadata()\\` cause it to run dynamically.\\n\\nWays to fix this:\\n - Cache the metadata with \\`\"use cache\"\\` in \\`generateMetadata()\\`\\n - Add a dynamic data access (e.g. \\`await connection()\\`) to the page to render it at request time\\n\\nLearn more: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata",
"1235": "unreachable sort key: %s",
"1236": "Expected '%s' after entry name in %s at offset %s, got %s.",
"1237": "Could not find 'globalThis.__RSC_MANIFEST[' in %s; client reference manifest format may have changed.",
"1238": "Unterminated entry-name string literal in %s.",
"1239": "Failed to parse JSON body of %s: %s",
"1240": "Expected '{' after 'globalThis.__RSC_MANIFEST[...] =' in %s at offset %s, got %s.",
"1241": "Expected string literal as entry name in %s at offset %s, got %s.",
"1242": "Unterminated JSON object in %s.",
"1244": "Route \"%s\": Next.js encountered %s during the initial render.\\n\\nThis value must either be prerendered or computed per request.\\n\\nWays to fix this:\\n - Render at request time by adding a dynamic data access (e.g. \\`await connection()\\`) before this call\\n - Prerender and cache the value with \\`\"use cache\"\\`\\n - Render the value on the client with \\`\"use client\"\\`\\n%s\\nLearn more: %s",
"1245": "Route \"%s\": Next.js encountered %s in a Client Component.\\n\\nThis value would be evaluated during the prerender and fixed at build time, instead of recomputed on each visit.\\n\\nWays to fix this:\\n - Wrap the Client Component in \\`<Suspense fallback={...}>\\`\\n - Move the read into a \\`useEffect\\` or event handler\\n\\nLearn more: %s",
"1247": "Route \"%s\": Next.js encountered %s without an explicit rendering intent.\\n\\nThis value can change between renders, so it must be either prerendered or computed later.\\n\\nWays to fix this:\\n - Render at request time by adding a dynamic data access (e.g. \\`await connection()\\`) before this call\\n - Prerender and cache the value with \\`\"use cache\"\\`\\n - Render the value on the client with \\`\"use client\"\\`\\n%s\\nLearn more: %s"
"1232": "unreachable sort key: %s",
"1233": "Expected '%s' after entry name in %s at offset %s, got %s.",
"1234": "Could not find 'globalThis.__RSC_MANIFEST[' in %s; client reference manifest format may have changed.",
"1235": "Unterminated entry-name string literal in %s.",
"1236": "Failed to parse JSON body of %s: %s",
"1237": "Expected '{' after 'globalThis.__RSC_MANIFEST[...] =' in %s at offset %s, got %s.",
"1238": "Expected string literal as entry name in %s at offset %s, got %s.",
"1239": "Unterminated JSON object in %s.",
"1240": "Route \"%s\": Next.js encountered %s during the initial render.\\n\\nThis value must either be prerendered or computed per request.\\n\\nWays to fix this:\\n - Render at request time by adding a dynamic data access (e.g. \\`await connection()\\`) before this call\\n - Prerender and cache the value with \\`\"use cache\"\\`\\n - Render the value on the client with \\`\"use client\"\\`\\n%s\\nLearn more: %s",
"1241": "Route \"%s\": Next.js encountered %s in a Client Component.\\n\\nThis value would be evaluated during the prerender and fixed at build time, instead of recomputed on each visit.\\n\\nWays to fix this:\\n - Wrap the Client Component in \\`<Suspense fallback={...}>\\`\\n - Move the read into a \\`useEffect\\` or event handler\\n\\nLearn more: %s",
"1242": "Route \"%s\": Next.js encountered %s without an explicit rendering intent.\\n\\nThis value can change between renders, so it must be either prerendered or computed later.\\n\\nWays to fix this:\\n - Render at request time by adding a dynamic data access (e.g. \\`await connection()\\`) before this call\\n - Prerender and cache the value with \\`\"use cache\"\\`\\n - Render the value on the client with \\`\"use client\"\\`\\n%s\\nLearn more: %s",
"1243": "This \"use cache\" has a dynamic cache life that was propagated to its parent.",
"1244": "A \"use cache\" with short \\`expire\\` (under 5 minutes) is nested inside another \"use cache\" that has no explicit \\`cacheLife\\`, which is not allowed during prerendering. Add \\`cacheLife()\\` to the outer \"use cache\" to choose whether it should be prerendered (with longer \\`expire\\`) or remain dynamic (with short \\`expire\\`). Read more: https://nextjs.org/docs/messages/nested-use-cache-no-explicit-cachelife",
"1245": "A \"use cache\" with zero \\`revalidate\\` is nested inside another \"use cache\" that has no explicit \\`cacheLife\\`, which is not allowed during prerendering. Add \\`cacheLife()\\` to the outer \"use cache\" to choose whether it should be prerendered (with non-zero \\`revalidate\\`) or remain dynamic (with zero \\`revalidate\\`). Read more: https://nextjs.org/docs/messages/nested-use-cache-no-explicit-cachelife"
}
Loading
Loading