pnpm Install

Installing BookNest's Dependencies with pnpm

Moving an npm 2,036 project to pnpm 69,400 does not require re-resolving anything. pnpm import reads package-lock.json and writes a pnpm-lock.yaml with the same versions, so the switch changes the layout on disk, not the code you run.

Converting BookNest's npm lockfile and installing with pnpmShell
mkdir ~/v5-ch1/pnpm-booknest && cd ~/v5-ch1/pnpm-booknest
cp -r ../booknest/{package.json,package-lock.json,app.js,server.js,db,public,test} .
pnpm import && rm package-lock.json
pnpm install --frozen-lockfile
ls node_modules/.pnpm | grep content-type
Output
Done in 58ms using pnpm v12.6.0
✓ Lockfile passes supply-chain policies (verified 142ms ago)
Lockfile is up to date, resolution step is skipped
...
Progress: resolved 80, reused 80, downloaded 0, added 80, done
...
Done in 92ms using pnpm v12.6.0
content-type@1.0.5
content-type@2.1.0

--frozen-lockfile, pnpm's npm ci, installed exactly the imported versions and skipped resolution. npm installed 82 packages, pnpm 80: content-type 2.1.0 exists once and is symlinked into the three packages that need it, where npm nested three copies (npm Install). pnpm why content-type prints the same tree as npm ls content-type. In a Dockerfile, run corepack 3,816 enable (Corepack) and pnpm install --frozen-lockfile where you would run npm ci; pnpm fetch can fill the store from the lockfile alone, before the source is copied, which keeps Docker 514 's layer cache effective (Docker).