Generated on 2026-11-23, data as of 2026-11-09 (UTC)
Next.js — Installation & Pinned Upgrade Guide
Install the Next.js framework in a new or existing Node.js workspace. Use the package-manager tabs below to choose between floating latest installs or an exact registry-pinned lockfile install.
Install Next.js
Requires Node.js 20.9 or later. Switch to the pnpm (Pinned) tab when reproducing an exact production build version.
Install the floating latest dist-tag with npm:
npm install next@latest react@latest react-dom@latest
Pin the exact current npm registry release with pnpm:
pnpm add next@16.4.6
# package.json excerpt
{
"dependencies": {
"next": "16.4.6"
}
}
Install the floating latest dist-tag with Yarn:
yarn add next@latest react@latest react-dom@latest
Verify Scripts
After installation, ensure your package.json defines dev, build, and start scripts invoking the next CLI binary.