DEV Community

Shaundai Person
Shaundai Person

Posted on • Edited on

1

How to switch to using new version of node using nvm

If you want to switch to a new version of node temporarily, use the command
nvm use [version]

where version is the version number. For example, to switch to node 18.20.0, your command will be
nvm use 18.20.0

This will switch the node version until you close your IDE, and then it will restore the default version.

If you'd like to change the default node version you're using so that you don't have to continue to change versions every time you re-open your IDE, add the keyword default to the command above like this:
nvm alias default [version]

where version is the version number. For example, to switch to node 18.20.0, your command will be
nvm use default 18.20.0

Top comments (2)

Collapse
 
maroine_bourass profile image
Maroine bourass • Edited

how to install new version with nvm ?

Collapse
 
shaundai profile image
Shaundai Person

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs