DEV Community 👩‍💻👨‍💻

Jaruwat Thongchana
Jaruwat Thongchana

Posted on

pnpm can manage Node.js version like nvm !

pnpm is a Node.js package manager like npm, yarn.

If you using nvm or Volta to manage node versions now pnpm can do that too.

Before we start you need to uninstall all of your node, nvm and Volta.

Installation

Install pnpm with standalone script.

curl -fsSL https://get.pnpm.io/install.sh | sh -
Enter fullscreen mode Exit fullscreen mode

Check version after installed.

pnpm -v
Enter fullscreen mode Exit fullscreen mode

Now you can install Node.js with pnpm

Example

Install and use LTS version

pnpm env use --global lts
Enter fullscreen mode Exit fullscreen mode

Install and use specific version

pnpm env use --global 16
Enter fullscreen mode Exit fullscreen mode

Install and use latest version

pnpm env use --global latest
Enter fullscreen mode Exit fullscreen mode

To remove node version use

pnpm env remove --global <version>
Enter fullscreen mode Exit fullscreen mode

refs:

Top comments (0)

Make Your Github Profile Stand Out

>> Check out this classic DEV post <<