Skip to main content

Install nvm

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
Load nvm into the current shell (or just open a new terminal session):
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"

Install Node.js 20.19.6

nvm install 20.19.6
nvm use 20.19.6
nvm alias default 20.19.6
Verify the version:
  node -v   # v20.19.6
  npm -v

Install pnpm 10.27.0

npm install -g pnpm@10.27.0
pnpm -v   # 10.27.0
All J-Optic, Jethings, and Code213 projects use pnpm as the package manager.
nvm installs Node per-user in ~/.nvm. If PM2 runs under a different user (e.g. via systemd), make sure that user also has nvm set up, or reference the full Node binary path in ecosystem.config.js.