Unverified Commit fa1370fd authored by Lee Robinson's avatar Lee Robinson Committed by GitHub

Update links from beta to stable docs. (#49349)

Now that the beta docs have been merged into stable with the release of
13.4, this updates all links as some paths have changed due to
redirects.

---------
Co-authored-by: 's avatarSteven <steven@ceriously.com>
Co-authored-by: 's avatarTobias Koppers <tobias.koppers@googlemail.com>
Co-authored-by: 's avatarJJ Kasper <jj@jjsweb.site>
parent 0f332055
...@@ -7,11 +7,6 @@ export default function RootLayout({ ...@@ -7,11 +7,6 @@ export default function RootLayout({
}) { }) {
return ( return (
<html lang="en"> <html lang="en">
{/*
<head /> will contain the components returned by the nearest parent
head.tsx. Find out more at https://beta.nextjs.org/docs/api-reference/file-conventions/head
*/}
<head />
<body>{children}</body> <body>{children}</body>
</html> </html>
) )
......
...@@ -40,7 +40,7 @@ export default function Home() { ...@@ -40,7 +40,7 @@ export default function Home() {
<div className={styles.grid}> <div className={styles.grid}>
<a <a
href="https://beta.nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app" href="https://nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
className={styles.card} className={styles.card}
target="_blank" target="_blank"
rel="noopener noreferrer" rel="noopener noreferrer"
......
...@@ -4,7 +4,7 @@ Next.js enables starting as a static site or Single-Page Application (SPA), then ...@@ -4,7 +4,7 @@ Next.js enables starting as a static site or Single-Page Application (SPA), then
When running `next build`, Next.js generates an HTML file per route. By breaking a strict SPA into individual HTML files, Next.js can avoid loading unnecessary JavaScript code on the client-side, reducing the bundle size and enabling faster page loads. When running `next build`, Next.js generates an HTML file per route. By breaking a strict SPA into individual HTML files, Next.js can avoid loading unnecessary JavaScript code on the client-side, reducing the bundle size and enabling faster page loads.
Learn more: https://beta.nextjs.org/docs/configuring/static-export Learn more: https://nextjs.org/docs/app/building-your-application/deploying/static-exports
## Deploy your own ## Deploy your own
......
...@@ -20,7 +20,7 @@ export default function Page() { ...@@ -20,7 +20,7 @@ export default function Page() {
<div> <div>
<a <a
className="font-medium text-zinc-300 hover:text-white" className="font-medium text-zinc-300 hover:text-white"
href="https://beta.nextjs.org/docs/rendering/server-and-client-components#using-context" href="https://nextjs.org/docs/rendering/server-and-client-components#using-context"
> >
Learn more Learn more
</a> </a>
......
...@@ -10,7 +10,7 @@ export default function Page() { ...@@ -10,7 +10,7 @@ export default function Page() {
<div> <div>
<a <a
className="font-medium text-zinc-300 hover:text-white" className="font-medium text-zinc-300 hover:text-white"
href="https://beta.nextjs.org/docs/styling/css-modules" href="https://nextjs.org/docs/app/building-your-application/styling/css-modules"
> >
Learn more Learn more
</a> </a>
......
...@@ -41,7 +41,7 @@ export default function Home() { ...@@ -41,7 +41,7 @@ export default function Home() {
<div className="mb-32 grid text-center lg:mb-0 lg:grid-cols-4 lg:text-left"> <div className="mb-32 grid text-center lg:mb-0 lg:grid-cols-4 lg:text-left">
<a <a
href="https://beta.nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app" href="https://nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30" className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
target="_blank" target="_blank"
rel="noopener noreferrer" rel="noopener noreferrer"
......
...@@ -41,7 +41,7 @@ export default function Home() { ...@@ -41,7 +41,7 @@ export default function Home() {
<div className="mb-32 grid text-center lg:mb-0 lg:grid-cols-4 lg:text-left"> <div className="mb-32 grid text-center lg:mb-0 lg:grid-cols-4 lg:text-left">
<a <a
href="https://beta.nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app" href="https://nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30" className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
target="_blank" target="_blank"
rel="noopener noreferrer" rel="noopener noreferrer"
......
...@@ -41,7 +41,7 @@ export default function Home() { ...@@ -41,7 +41,7 @@ export default function Home() {
<div className={styles.grid}> <div className={styles.grid}>
<a <a
href="https://beta.nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app" href="https://nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
className={styles.card} className={styles.card}
target="_blank" target="_blank"
rel="noopener noreferrer" rel="noopener noreferrer"
......
...@@ -41,7 +41,7 @@ export default function Home() { ...@@ -41,7 +41,7 @@ export default function Home() {
<div className={styles.grid}> <div className={styles.grid}>
<a <a
href="https://beta.nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app" href="https://nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
className={styles.card} className={styles.card}
target="_blank" target="_blank"
rel="noopener noreferrer" rel="noopener noreferrer"
......
...@@ -4,4 +4,4 @@ ...@@ -4,4 +4,4 @@
This new font system also allows you to conveniently use all Google Fonts with performance and privacy in mind. CSS and font files are downloaded at build time and self-hosted with the rest of your static assets. No requests are sent to Google by the browser. This new font system also allows you to conveniently use all Google Fonts with performance and privacy in mind. CSS and font files are downloaded at build time and self-hosted with the rest of your static assets. No requests are sent to Google by the browser.
[Read more](https://beta.nextjs.org/docs/optimizing/fonts) [Read more](https://nextjs.org/docs/app/building-your-application/optimizing/fonts)
...@@ -128,7 +128,10 @@ impl Issue for NextSegmentConfigParsingIssue { ...@@ -128,7 +128,10 @@ impl Issue for NextSegmentConfigParsingIssue {
#[turbo_tasks::function] #[turbo_tasks::function]
fn documentation_link(&self) -> StringVc { fn documentation_link(&self) -> StringVc {
StringVc::cell("https://beta.nextjs.org/docs/api-reference/segment-config".to_string()) StringVc::cell(
"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"
.to_string(),
)
} }
#[turbo_tasks::function] #[turbo_tasks::function]
......
...@@ -412,7 +412,7 @@ export async function getPageStaticInfo(params: { ...@@ -412,7 +412,7 @@ export async function getPageStaticInfo(params: {
} }
if (pageType === 'app') { if (pageType === 'app') {
if (config) { if (config) {
const message = `\`export const config\` in ${pageFilePath} is deprecated. Please change \`runtime\` property to segment export config. See https://beta.nextjs.org/docs/api-reference/segment-config` const message = `\`export const config\` in ${pageFilePath} is deprecated. Please change \`runtime\` property to segment export config. See https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config`
if (isDev) { if (isDev) {
Log.warnOnce(message) Log.warnOnce(message)
} else { } else {
......
...@@ -91,7 +91,7 @@ export { e${cnt++} as ${ref} };` ...@@ -91,7 +91,7 @@ export { e${cnt++} as ${ref} };`
if (buildInfo.rsc?.type !== RSC_MODULE_TYPES.client) { if (buildInfo.rsc?.type !== RSC_MODULE_TYPES.client) {
if (noopHeadPath === this.resourcePath) { if (noopHeadPath === this.resourcePath) {
warnOnce( warnOnce(
`Warning: You're using \`next/head\` inside the \`app\` directory, please migrate to the Metadata API. See https://beta.nextjs.org/docs/api-reference/metadata for more details.` `Warning: You're using \`next/head\` inside the \`app\` directory, please migrate to the Metadata API. See https://nextjs.org/docs/app/api-reference/file-conventions/metadata for more details.`
) )
} }
} }
......
...@@ -65,7 +65,7 @@ function formatRSCErrorMessage( ...@@ -65,7 +65,7 @@ function formatRSCErrorMessage(
if (isPagesDir) { if (isPagesDir) {
formattedMessage = message.replace( formattedMessage = message.replace(
NEXT_RSC_ERR_CLIENT_IMPORT, NEXT_RSC_ERR_CLIENT_IMPORT,
`\n\nYou're importing a component that needs $1. That only works in a Server Component which is not supported in the pages/ directory. Read more: https://beta.nextjs.org/docs/rendering/server-and-client-components\n\n` `\n\nYou're importing a component that needs $1. That only works in a Server Component which is not supported in the pages/ directory. Read more: https://nextjs.org/docs/getting-started/react-essentials#server-components\n\n`
) )
formattedVerboseMessage = '\n\nImport trace for requested module:\n' formattedVerboseMessage = '\n\nImport trace for requested module:\n'
} else { } else {
...@@ -91,7 +91,7 @@ function formatRSCErrorMessage( ...@@ -91,7 +91,7 @@ function formatRSCErrorMessage(
} else if (NEXT_RSC_ERR_INVALID_API.test(message)) { } else if (NEXT_RSC_ERR_INVALID_API.test(message)) {
formattedMessage = message.replace( formattedMessage = message.replace(
NEXT_RSC_ERR_INVALID_API, NEXT_RSC_ERR_INVALID_API,
`\n\n"$1" is not supported in app/. Read more: https://beta.nextjs.org/docs/data-fetching/fundamentals\n\n` `\n\n"$1" is not supported in app/. Read more: https://nextjs.org/docs/app/building-your-application/data-fetching\n\n`
) )
formattedVerboseMessage = '\n\nFile path:\n' formattedVerboseMessage = '\n\nFile path:\n'
} else if (NEXT_RSC_ERR_ERROR_FILE_SERVER_COMPONENT.test(message)) { } else if (NEXT_RSC_ERR_ERROR_FILE_SERVER_COMPONENT.test(message)) {
...@@ -103,14 +103,14 @@ function formatRSCErrorMessage( ...@@ -103,14 +103,14 @@ function formatRSCErrorMessage(
} else if (NEXT_RSC_ERR_CLIENT_METADATA_EXPORT.test(message)) { } else if (NEXT_RSC_ERR_CLIENT_METADATA_EXPORT.test(message)) {
formattedMessage = message.replace( formattedMessage = message.replace(
NEXT_RSC_ERR_CLIENT_METADATA_EXPORT, NEXT_RSC_ERR_CLIENT_METADATA_EXPORT,
`\n\nYou are attempting to export "$1" from a component marked with "use client", which is disallowed. Either remove the export, or the "use client" directive. Read more: https://beta.nextjs.org/docs/api-reference/metadata\n\n` `\n\nYou are attempting to export "$1" from a component marked with "use client", which is disallowed. Either remove the export, or the "use client" directive. Read more: https://nextjs.org/docs/getting-started/react-essentials#the-use-client-directive\n\n`
) )
formattedVerboseMessage = '\n\nFile path:\n' formattedVerboseMessage = '\n\nFile path:\n'
} else if (NEXT_RSC_ERR_CONFLICT_METADATA_EXPORT.test(message)) { } else if (NEXT_RSC_ERR_CONFLICT_METADATA_EXPORT.test(message)) {
formattedMessage = message.replace( formattedMessage = message.replace(
NEXT_RSC_ERR_CONFLICT_METADATA_EXPORT, NEXT_RSC_ERR_CONFLICT_METADATA_EXPORT,
`\n\n"metadata" and "generateMetadata" cannot be exported at the same time, please keep one of them. Read more: https://beta.nextjs.org/docs/api-reference/metadata\n\n` `\n\n"metadata" and "generateMetadata" cannot be exported at the same time, please keep one of them. Read more: https://nextjs.org/docs/app/api-reference/file-conventions/metadata\n\n`
) )
formattedVerboseMessage = '\n\nFile path:\n' formattedVerboseMessage = '\n\nFile path:\n'
......
...@@ -35,7 +35,7 @@ export function getSocialImageFallbackMetadataBase( ...@@ -35,7 +35,7 @@ export function getSocialImageFallbackMetadataBase(
// Add new line to warning for worker output // Add new line to warning for worker output
console.log() console.log()
Log.warnOnce( Log.warnOnce(
`metadata.metadataBase is not set for resolving social open graph or twitter images, fallbacks to "${fallbackMetadata.origin}". See https://beta.nextjs.org/docs/api-reference/metadata#metadatabase` `metadata.metadataBase is not set for resolving social open graph or twitter images, fallbacks to "${fallbackMetadata.origin}". See https://nextjs.org/docs/app/api-reference/functions/generate-metadata#metadatabase`
) )
} }
......
...@@ -222,7 +222,7 @@ export async function writeConfigurationDefaults( ...@@ -222,7 +222,7 @@ export async function writeConfigurationDefaults(
'tsconfig.json' 'tsconfig.json'
)} extends another configuration, which means we cannot add the Next.js TypeScript plugin automatically. To improve your development experience, we recommend adding the Next.js plugin (\`${chalk.cyan( )} extends another configuration, which means we cannot add the Next.js TypeScript plugin automatically. To improve your development experience, we recommend adding the Next.js plugin (\`${chalk.cyan(
'"plugins": [{ "name": "next" }]' '"plugins": [{ "name": "next" }]'
)}\`) manually to your TypeScript configuration. Learn more: https://beta.nextjs.org/docs/configuring/typescript#using-the-typescript-plugin\n` )}\`) manually to your TypeScript configuration. Learn more: https://nextjs.org/docs/app/building-your-application/configuring/typescript#the-typescript-plugin\n`
) )
} else if (!hasNextPlugin) { } else if (!hasNextPlugin) {
if (!('plugins' in userTsConfig.compilerOptions)) { if (!('plugins' in userTsConfig.compilerOptions)) {
......
...@@ -182,7 +182,7 @@ export interface ExperimentalConfig { ...@@ -182,7 +182,7 @@ export interface ExperimentalConfig {
externalDir?: boolean externalDir?: boolean
/** /**
* The App Router (app directory) enables support for layouts, Server Components, streaming, and colocated data fetching. * The App Router (app directory) enables support for layouts, Server Components, streaming, and colocated data fetching.
* @see https://beta.nextjs.org/docs/api-reference/next-config#appdir * @see https://nextjs.org/docs/app/api-reference/next-config-js/appDir
*/ */
appDir?: boolean appDir?: boolean
amp?: { amp?: {
...@@ -224,7 +224,7 @@ export interface ExperimentalConfig { ...@@ -224,7 +224,7 @@ export interface ExperimentalConfig {
/** /**
* A list of packages that should be treated as external in the RSC server build. * A list of packages that should be treated as external in the RSC server build.
* @see https://beta.nextjs.org/docs/api-reference/next-config#servercomponentsexternalpackages * @see https://nextjs.org/docs/app/api-reference/next-config-js/serverComponentsExternalPackages
*/ */
serverComponentsExternalPackages?: string[] serverComponentsExternalPackages?: string[]
...@@ -251,14 +251,14 @@ export interface ExperimentalConfig { ...@@ -251,14 +251,14 @@ export interface ExperimentalConfig {
/** /**
* For use with `@next/mdx`. Compile MDX files using the new Rust compiler. * For use with `@next/mdx`. Compile MDX files using the new Rust compiler.
* @see https://beta.nextjs.org/docs/api-reference/next-config#mdxrs * @see https://nextjs.org/docs/app/api-reference/next-config-js/mdxRs
*/ */
mdxRs?: boolean mdxRs?: boolean
/** /**
* Generate Route types and enable type checking for Link and Router.push, etc. * Generate Route types and enable type checking for Link and Router.push, etc.
* This option requires `appDir` to be enabled first. * This option requires `appDir` to be enabled first.
* @see https://beta.nextjs.org/docs/api-reference/next-config#typedroutes * @see https://nextjs.org/docs/app/api-reference/next-config-js/typedRoutes
*/ */
typedRoutes?: boolean typedRoutes?: boolean
......
...@@ -36,7 +36,7 @@ const API_DOCS: Record< ...@@ -36,7 +36,7 @@ const API_DOCS: Record<
'"force-static"': '"force-static"':
'This forces caching of all fetches and returns empty values from `cookies`, `headers` and `useSearchParams`.', 'This forces caching of all fetches and returns empty values from `cookies`, `headers` and `useSearchParams`.',
}, },
link: 'https://beta.nextjs.org/docs/api-reference/segment-config#dynamic', link: 'https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#dynamic',
}, },
fetchCache: { fetchCache: {
description: description:
...@@ -57,7 +57,7 @@ const API_DOCS: Record< ...@@ -57,7 +57,7 @@ const API_DOCS: Record<
'"force-cache"': '"force-cache"':
"This lets you intentionally opt-in to all caching of data. This option forces all fetches to be cache even if the `cache: 'no-store'` option is passed to `fetch()`.", "This lets you intentionally opt-in to all caching of data. This option forces all fetches to be cache even if the `cache: 'no-store'` option is passed to `fetch()`.",
}, },
link: 'https://beta.nextjs.org/docs/api-reference/segment-config#fetchcache', link: 'https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#fetchcache',
}, },
preferredRegion: { preferredRegion: {
description: description:
...@@ -68,7 +68,7 @@ const API_DOCS: Record< ...@@ -68,7 +68,7 @@ const API_DOCS: Record<
'"global"': 'Prefer deploying globally.', '"global"': 'Prefer deploying globally.',
'"home"': 'Prefer deploying to the Home region.', '"home"': 'Prefer deploying to the Home region.',
}, },
link: 'https://beta.nextjs.org/docs/api-reference/segment-config#preferredregion', link: 'https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#preferredregion',
isValid: (value: string) => { isValid: (value: string) => {
try { try {
const parsed = JSON.parse(value) const parsed = JSON.parse(value)
...@@ -98,7 +98,7 @@ const API_DOCS: Record< ...@@ -98,7 +98,7 @@ const API_DOCS: Record<
0: 'Specifying `0` implies that this layout or page should never be static.', 0: 'Specifying `0` implies that this layout or page should never be static.',
30: 'Set the revalidation time to `30` seconds. The value can be `0` or any positive number.', 30: 'Set the revalidation time to `30` seconds. The value can be `0` or any positive number.',
}, },
link: 'https://beta.nextjs.org/docs/api-reference/segment-config#revalidate', link: 'https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#revalidate',
isValid: (value: string) => { isValid: (value: string) => {
return value === 'false' || Number(value) >= 0 return value === 'false' || Number(value) >= 0
}, },
...@@ -114,7 +114,7 @@ const API_DOCS: Record< ...@@ -114,7 +114,7 @@ const API_DOCS: Record<
false: false:
'Disallow rendering dynamic params that are not generated by `generateStaticParams`.', 'Disallow rendering dynamic params that are not generated by `generateStaticParams`.',
}, },
link: 'https://beta.nextjs.org/docs/api-reference/segment-config#dynamicparams', link: 'https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#dynamicparams',
}, },
runtime: { runtime: {
description: description:
...@@ -124,11 +124,11 @@ const API_DOCS: Record< ...@@ -124,11 +124,11 @@ const API_DOCS: Record<
'"edge"': 'Prefer the Edge runtime.', '"edge"': 'Prefer the Edge runtime.',
'"experimental-edge"': 'Prefer the experimental Edge runtime.', '"experimental-edge"': 'Prefer the experimental Edge runtime.',
}, },
link: 'https://beta.nextjs.org/docs/api-reference/segment-config#runtime', link: 'https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#runtime',
}, },
metadata: { metadata: {
description: 'Next.js Metadata configurations', description: 'Next.js Metadata configurations',
link: 'https://beta.nextjs.org/docs/api-reference/metadata', link: 'https://nextjs.org/docs/app/api-reference/file-conventions/metadata',
}, },
} }
......
...@@ -22,7 +22,7 @@ const errorEntry = { ...@@ -22,7 +22,7 @@ const errorEntry = {
file: source, file: source,
category: ts.DiagnosticCategory.Error, category: ts.DiagnosticCategory.Error,
code: NEXT_TS_ERRORS.INVALID_ERROR_COMPONENT, code: NEXT_TS_ERRORS.INVALID_ERROR_COMPONENT,
messageText: `Error Components must be Client Components, please add the "use client" directive: https://beta.nextjs.org/docs/api-reference/file-conventions/error`, messageText: `Error Components must be Client Components, please add the "use client" directive: https://nextjs.org/docs/app/api-reference/file-conventions/error`,
start: 0, start: 0,
length: source.text.length, length: source.text.length,
}, },
......
...@@ -425,7 +425,7 @@ const metadata = { ...@@ -425,7 +425,7 @@ const metadata = {
file: getSource(fileName), file: getSource(fileName),
category: ts.DiagnosticCategory.Error, category: ts.DiagnosticCategory.Error,
code: NEXT_TS_ERRORS.INVALID_METADATA_EXPORT, code: NEXT_TS_ERRORS.INVALID_METADATA_EXPORT,
messageText: `The 'metadata' export value is not typed correctly, please make sure it is typed as 'Metadata':\nhttps://beta.nextjs.org/docs/guides/seo#static-metadata`, messageText: `The 'metadata' export value is not typed correctly, please make sure it is typed as 'Metadata':\nhttps://nextjs.org/docs/app/building-your-application/optimizing/metadata#static-metadata`,
start: e.name.getStart(), start: e.name.getStart(),
length: e.name.getWidth(), length: e.name.getWidth(),
}, },
......
...@@ -29,10 +29,10 @@ createNextDescribe( ...@@ -29,10 +29,10 @@ createNextDescribe(
const text = await link.text() const text = await link.text()
const href = await link.getAttribute('href') const href = await link.getAttribute('href')
expect(text).toEqual( expect(text).toEqual(
'https://beta.nextjs.org/docs/data-fetching/fundamentals' 'https://nextjs.org/docs/app/building-your-application/data-fetching'
) )
expect(href).toEqual( expect(href).toEqual(
'https://beta.nextjs.org/docs/data-fetching/fundamentals' 'https://nextjs.org/docs/app/building-your-application/data-fetching'
) )
await cleanup() await cleanup()
......
...@@ -52,7 +52,7 @@ createNextDescribe( ...@@ -52,7 +52,7 @@ createNextDescribe(
"./components/Comp.js "./components/Comp.js
ReactServerComponentsError: ReactServerComponentsError:
You're importing a component that needs next/headers. That only works in a Server Component which is not supported in the pages/ directory. Read more: https://beta.nextjs.org/docs/rendering/server-and-client-components You're importing a component that needs next/headers. That only works in a Server Component which is not supported in the pages/ directory. Read more: https://nextjs.org/docs/getting-started/react-essentials#server-components
,-[1:1] ,-[1:1]
1 | 1 |
...@@ -94,7 +94,7 @@ createNextDescribe( ...@@ -94,7 +94,7 @@ createNextDescribe(
"./components/Comp.js "./components/Comp.js
ReactServerComponentsError: ReactServerComponentsError:
You're importing a component that needs server-only. That only works in a Server Component which is not supported in the pages/ directory. Read more: https://beta.nextjs.org/docs/rendering/server-and-client-components You're importing a component that needs server-only. That only works in a Server Component which is not supported in the pages/ directory. Read more: https://nextjs.org/docs/getting-started/react-essentials#server-components
,-[1:1] ,-[1:1]
1 | 1 |
......
...@@ -21,7 +21,7 @@ createNextDescribe( ...@@ -21,7 +21,7 @@ createNextDescribe(
} }
expect(next.cliOutput).toContain('`export const config`') expect(next.cliOutput).toContain('`export const config`')
expect(next.cliOutput).toContain( expect(next.cliOutput).toContain(
'app/legacy-runtime-config/page.js is deprecated. Please change `runtime` property to segment export config. See https://beta.nextjs.org/docs/api-reference/segment-config' 'app/legacy-runtime-config/page.js is deprecated. Please change `runtime` property to segment export config. See https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config'
) )
}) })
} }
......
...@@ -15,7 +15,7 @@ export default function Home() { ...@@ -15,7 +15,7 @@ export default function Home() {
</p> </p>
<div className={styles.grid}> <div className={styles.grid}>
<a href="https://beta.nextjs.org/docs" className={styles.card}> <a href="https://nextjs.org/docs" className={styles.card}>
<h2>Documentation &rarr;</h2> <h2>Documentation &rarr;</h2>
<p>Find in-depth information about Next.js 13</p> <p>Find in-depth information about Next.js 13</p>
</a> </a>
......
...@@ -25,7 +25,7 @@ describe('app dir - metadata missing metadataBase', () => { ...@@ -25,7 +25,7 @@ describe('app dir - metadata missing metadataBase', () => {
) )
expect(next.cliOutput).toInclude('"http://localhost:') expect(next.cliOutput).toInclude('"http://localhost:')
expect(next.cliOutput).toInclude( expect(next.cliOutput).toInclude(
'. See https://beta.nextjs.org/docs/api-reference/metadata#metadatabase' '. See https://nextjs.org/docs/app/api-reference/functions/generate-metadata#metadatabase'
) )
}) })
}) })
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment