Three ways to get Node + npm on your machine, from simplest (system package) to per-project version management.
Install using system package manager
paru -S nodejs npm
# Update all system packages
paru -Syunode -v
npm -vInstall Node Version Manager
paru -S nvmLook for node versions to install and check for installed versions
nvm ls-remote
nvm list # or, `nvm ls`Install the preferred node versions to nvm
nvm install <version>
nvm install --lts # install the latest LTS version- Only for the current terminal session
nvm use <version>- For all terminal sessions (set as default)
nvm alias default <version>- To use a specific version for a project
- Create a
.nvmrcfile in project root
echo "<version>" > .nvmrc- Install and use the specified version
nvm install
nvm usenode -v
npm -vInstall Fast Node Manager
paru -S fnmLook for node versions to install and check for installed versions
fnm list-remote
fnm listInstall the preferred node versions to fnm
fnm install <version>- Only for the current terminal session
fnm use <version>- For all terminal sessions (set as default)
fnm default <version>- To use a specific version for a project
- Create a
.nvmrcor.node-versionfile in project root
echo "<version>" > .node-version- Install the specified version
fnm installThis is a global setting
eval "$(fnm env --use-on-cd)"node -v
npm -v