diff --git a/errors/ppr-preview.mdx b/errors/ppr-preview.mdx new file mode 100644 index 0000000000..fb431e1dcd --- /dev/null +++ b/errors/ppr-preview.mdx @@ -0,0 +1,15 @@ +--- +title: Partial Prerendering Preview in Next.js Canary +--- + +## Why This Error Occurred + +In your `next.config.js` you enabled `experimental.ppr` but you are not using the latest Next.js canary. To ensure you are experimenting with the latest version, we currently require the use of a canary release. + +## Possible Ways to Fix It + +- Install `next@canary` (e.g. `npm install next@canary`) + +## Useful Links + +- [Partial Prerendering Preview](/blog/next-14#partial-prerendering-preview) diff --git a/packages/next/src/server/config.ts b/packages/next/src/server/config.ts index 4128eec600..3bea09679a 100644 --- a/packages/next/src/server/config.ts +++ b/packages/next/src/server/config.ts @@ -256,8 +256,8 @@ function assignDefaults( result.experimental?.ppr && !process.env.__NEXT_VERSION!.includes('canary') ) { - Log.warn( - `The experimental.ppr feature is present in your current version but we recommend using the latest canary version for the best experience.` + throw new Error( + `The experimental.ppr preview feature can only be enabled when using the latest canary version of Next.js. See more info here: https://nextjs.org/docs/messages/ppr-preview` ) }