Loading...
npm install -g pnpm
npm install zodcorepack enable
pnpm add zodCorepack provides the pnpm version pinned in package.json, and pnpm add keeps pnpm-lock.yaml as the only lock file.
npm install in a pnpm project and creating a second lock file.pnpm add and pnpm install, not npm install, and only pnpm-lock.yaml is committed.pnpm install --frozen-lockfile.package.json, since pnpm blocks undeclared dependencies.workspace: protocol.pnpm keeps one copy of each package version in a global store and links it into every project's node_modules, instead of copying it each time.
pnpm only exposes packages declared in your package.json. npm's flat node_modules let you import transitive dependencies by accident. Add the missing package explicitly.
Use pnpm dlx <package>, the pnpm version of npx.