What this thread does
Do first: run pnpm --version in the workspace, then choose the deploy branch for that version before changing injectWorkspacePackages.
Short answer
As of November 2026, pnpm 12.23.0 has a release listing. Current deploy docs say injection is no longer required since 12.2.0. The 10.x deploy documentation requires injected workspace dependencies unless legacy mode is selected. Do not apply the old error's setting advice indiscriminately to current deployments.
Choose / don't choose
- Current dedicated deploy lockfile: choose on the current stable release; don't turn on injection solely to satisfy the obsolete blanket requirement. Linked dependencies are rewritten into the dedicated deploy graph (deploy).
- Older injection-required implementation: choose
injectWorkspacePackages: trueand maintain built copies when that deployment behavior is desired; don't assume source symlink updates refresh injected files (workspace settings). - Legacy implementation: choose
pnpm deploy --legacywhen retaining the older deployment algorithm or using deploy withoutinject-workspace-packages=true. Don't treat it as identical lockfile generation: it disables dedicated-lockfile creation from the shared lockfile (10.x deploy).
Not for: compiling shared package exports; see javascript-monorepos-share-built-packages-pnpm-exports.
Settings that matter
| Setting or flag | Value / default | Applies to | Source |
|---|---|---|---|
injectWorkspacePackages | true enables injection; default false | Current workspace docs | workspace, 10.x |
--filter | Select exactly one deployed project: pnpm --filter=<deployed-project> --prod deploy <target-directory> | Current deploy | deploy |
--prod | Exclude devDependencies; build using development tools before exporting | Current and 10.x deploy | 10.x |
--legacy / forceLegacyDeploy | --legacy forces the legacy implementation; forceLegacyDeploy: true selects legacy behavior; default false | Current and 10.x deploy | 10.x |
syncInjectedDepsAfterScripts | List script names; default undefined | Current injection behavior | workspace |
overrides | Pin an ambiguous peer to one version, or use injection to disambiguate | Current linked-workspace deploy path | deploy |
The 12.2.0 release and current deploy docs say injection is no longer required since 12.2.0. ak99372's April 7, 2025 request records ERR_PNPM_DEPLOY_NONINJECTED_WORKSPACE; zkochan points to legacy mode and injected-copy synchronization. Those comments describe the old behavior.
Order of operations
1. Align the workspace/CI pnpm pin and inspect which deployment implementation actually runs. Injection settings belong to workspace installation, not only a last-minute deploy command. 2. If adopting injection, build producer packages and synchronize the injected copies after the relevant scripts (workspace). 3. Build the application, then deploy one selected project with --prod to a separate target directory (deployment). 4. Move/copy that output outside the source workspace and run its real entry point with only its deployed files and dependencies. Inspect that required build artifacts are present; file inclusion uses the documented files, .npmignore and .gitignore rules (10.x file selection).
Known failures and fixes
| Error (short quote) | Cause | Fix | Source |
|---|---|---|---|
ERR_PNPM_DEPLOY_NONINJECTED_WORKSPACE | The report says pnpm v10 deploy requires inject-workspace-packages=true | Confirm the running pin; choose legacy to deploy without injection | 2025 report, 10.x docs |
ERR_PNPM_DEPLOY_AMBIGUOUS_PEER | The deploy error names the package, peer and competing resolutions | Inspect the reported resolutions; pin one with overrides or enable injection | current deploy |
Missing
- The linked source does not confirm: change workspace settings and run
pnpm installto reconcile the install/lockfile - No project's peer graph, build script names or artifact paths are specified; a universal override version or production entry point cannot be selected.
Checked
2026-11-24; pnpm 12.23.0 release, current/10.x deploy and workspace docs, and ak99372/zkochan discussion read. No install, build or deployment executed.
Started from a post by @pnpm, packaged by the editor. Original post