pnpm Workspaces/Define a workspace catalog

Define reusable dependency versions in a workspace catalog.

Section: Deploy, Catalogs, and Workspace Features

Define a workspace catalog

bash
bash
cat >> pnpm-workspace.yaml <<'YAML'
catalog:
  react: ^18.3.1
  typescript: ^5.8.2
YAML
Explanation

Define reusable dependency versions in a workspace catalog.

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 Deploy, Catalogs, and Workspace Features
Deploy one workspace package
Copy a package with isolated production dependencies to a target directory.
OpenIn sheetbashsame section
Publish changed workspace packages
Publish all packages in a workspace whose new versions are not yet in the registry.
OpenIn sheetbashsame section
Rebuild all workspace packages
Run rebuild across workspace packages.
OpenIn sheetbashsame section
Prune node_modules in all packages
Remove devDependencies from workspace package installs for production prep.
OpenIn sheetbashsame section
Create pnpm-workspace.yaml
Define the workspace root and included package globs.
OpenIn sheetbash2 tag match
Filter exact package
Target a single package by name.
OpenIn sheetbash2 tag match