From 8296efff3ebf8511e2b5e5814cfd93aa93866acc Mon Sep 17 00:00:00 2001 From: Shubhan Chemburkar Date: Sun, 18 May 2025 14:13:36 +0530 Subject: [PATCH] Include documentation for Node Version included additional documentation for updating node vversion for a next.js static site using .nvmrc --- .../nextjs/deploy-a-static-nextjs-site.mdx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/content/docs/pages/framework-guides/nextjs/deploy-a-static-nextjs-site.mdx b/src/content/docs/pages/framework-guides/nextjs/deploy-a-static-nextjs-site.mdx index e6e93a0a4ab74b0..154f80a0b40b048 100644 --- a/src/content/docs/pages/framework-guides/nextjs/deploy-a-static-nextjs-site.mdx +++ b/src/content/docs/pages/framework-guides/nextjs/deploy-a-static-nextjs-site.mdx @@ -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. +``` +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 +```