Add a package to devDependencies.
Section: Install, Add, Remove, Update
Add dev dependency
bash
bash
pnpm add -D typescriptExplanation
Add a package to devDependencies.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Install, Add, Remove, Update
Install all dependencies
Install dependencies from package.json and lockfile.
Install with frozen lockfile
Fail if the lockfile would need changes; common in CI.
Install in offline mode
Install using only already-fetched packages from the store.