Commands
DO NOT install nvm via another package manager like brew.
# 1. Install or update NVM (https://github.com/nvm-sh/nvm)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
# 2. Install node
nvm install node
# 3. Install pnpm global
npm install -g pnpm
# list oudated global packages
npm -g outdated
# list oudated local packages
npm outdated
#--------------------------------------------
# UPDATE GLOBAL PACKAGES
#--------------------------------------------
# Update NPM global
npm install -g npm@latest
# Update PNPM global
npm install -g pnpm@latest # or pnpm add -g pnpm@latest
# Verify
node -v
npm -v
pnpm -v
PNPM Commands
# dlx is pnpm's equivalent of `npx` in npm
# It allows you to run a package's CLI tool without installing it globally or adding it to your project's dependencies. It temporarily downloads and executes the specified CLI command
pnpm dlx tailwindcss init
Remove node_modules
Remove node_modules
directory and package-lock.json
files to avoid conflicts.
rm -rf node_modules package-lock.json
Tailwind install
pnpm add -g tailwindcss