How to install Node.js and pnpm

Install nvm

yay -S nvm

or install from source

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash

you can check last version on https://github.com/nvm-sh/nvm

List node versions

nvm ls-remote

Install selected version

nvm install 22

Enable corepack

corepack enable

Confirm versions

$ node --version
v22.6.0
$ pnpm --version
9.6.0