pnpm: command not found

Generated projects install with pnpm, not npm, because the workspace layout depends on it.

The fix

Corepack ships with Node and installs the version the project asks for.

Terminal
$corepack enable
$corepack prepare pnpm@latest --activate
# or, without corepack
$npm install -g pnpm

Why it happens

A generated project is a pnpm workspace: the apps and the shared package resolve each other through it. Installing with npm or yarn instead produces a tree where packages/shared is not linked, and the first import of a shared type fails to resolve.

A project's package.json names a pnpm version in packageManager, and corepack honours it. That pin is deliberate: a major pnpm release changes how the lockfile and node_modules are laid out, and a project installed with two different majors behaves differently on two machines.

How to tell it worked

Terminal
$pnpm --version

Still stuck? The troubleshooting page covers more, and the errors guide lists every message with its cause. Running grit doctor --env checks this machine for all of them at once.