PNPM
Install
brew install node
# This will automatically install pnpm on your system.
corepack enable pnpm
# (in your node project root) You can pin the version of pnpm used on your project using the following command:
corepack use pnpm@latest-10corepack upProject Setup
# for example to pin pnpm version for spectacular
cd ~/Developer/Work/web/spectacular
corepack use pnpm@latest-10 Commands
# add package to monorepo's root
pnpm add debug -W
# add package to global
pnpm add debug --global
# update package versions in a repo
pnpm up
pnpm up --latest
pnpm up --latest --global
pnpm ls prune
pnpm ls
pnpm ls --global
pnpm audit
# find why a specific package installed
pnpm why vite
# for monorepo use -r to search all sub projects
pnpm why vite -r
# Publish all packages in topological order from the workspace.
pnpm publish -rPatching a node module
create SvelteKit workspace
Reference
Last updated