Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,19 @@ After deploying your site, you will receive a unique subdomain for your project
Every time you commit new code to your Next.js site, Cloudflare Pages will automatically rebuild your project and deploy it. You will also get access to [preview deployments](/pages/configuration/preview-deployments/) on new pull requests, so you can preview how changes look to your site before deploying them to production.

For the complete guide to deploying your first site to Cloudflare Pages, refer to the [Get started guide](/pages/get-started/).

## Using a specific Node.js version

Some Next.js projects have additional requirements for different Node.js versions.

```sh
You are using Node.js 18.17.1. For Next.js, Node.js version "^18.18.0 || ^19.8.0 || >= 20.0.0" is required.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this sh (rather than plain or text)?
Is it an error message?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, error message from build when not specifying a node version on a new default setup.
Reason Cloudflare defaults to 18.17.1 while NextJS defaults to minimum 18.18.0

```
To use a specific Node.js version for Next.js:

1. In Root directory of your project, create a `.nvmrc` file
1. Specify the version of Node.js required like below:

```
v18.18.0
```