With my recent migration from Windows to a Linux distro, I decided to make the change from npm
to pnpm
. There are vast quantities of articles about why pnpm is worth it. This article is more for me to remember how to install and use it.
Fresh OS install
- Get node
- Install pnpm
Migrating Project
- Clone repo
- Delete node_modules
- (Optional) To prevent use of yarn/npm add
"preinstall": "npx only-allow pnpm"
to the package.json scripts - Run
pnpm import
to get the new lock file - Remove packages-lock.json
- Install dependencies
pnpm install
- Test.
pnpm dev
Resources