🎓 A1Learner
🔍
0 of 50 lessons completed

Next.js Install Node.js

Node.js runs JavaScript on your computer. Next.js needs it, so install it first.

Check the Node.js version

The version number proves the install worked. This machine runs v24.22.1.

node -v

Check the npm version

npm ships with Node.js. Its version number proves the installer finished the job.

npm -v

Example

node -v
npm -v

Key points

  • Node.js: a program that runs JavaScript outside the browser
  • LTS: the long-term support version, the safe pick for a course
  • This course uses Node.js 22 LTS. It is the recommended version.
  • Next.js 16 needs Node.js 20.9 or newer. Older versions will not run it.
  • npm: the package installer that ships with Node.js
  • On Windows and macOS, run the installer from the Node.js site.

In this example, two commands check the install. The first prints the Node.js version, v24.22.1. The second prints the npm version, 10.9.4. Two version numbers mean the install worked. The Node.js number is newer than 20.9, so it clears the Next.js 16 bar.

Note

On Linux, use your package manager. The version check below works the same on all three systems.

Try it Yourself

Edit the code, then press Run.

Running is simulated · TypeScript Playground

Exercise

What is the oldest Node.js version Next.js 16 accepts?