Skip to content
Latchkey

pnpm workspace package not found (workspace:*) in CI

pnpm could not resolve a workspace:* dependency because no local package matches that name. The package was renamed, is outside the workspace globs, or its package.json is missing.

What this error means

pnpm install fails resolving a workspace dependency: "In <pkg>: \"@acme/ui@workspace:*\" is in the dependencies but no package named @acme/ui is in this workspace".

pnpm
ERR_PNPM_NO_MATCHING_VERSION_INSIDE_WORKSPACE  In apps/web:
"@acme/ui@workspace:*" is in the dependencies but no package named
"@acme/ui" is present in the workspace

Common causes

Package renamed

The dependency uses an old name no local package declares anymore.

Package outside workspace globs

pnpm-workspace.yaml packages globs do not cover the package directory, so it is not in the workspace.

Missing or wrong package.json name

The target package has no package.json or a different name field than the dependency expects.

How to fix it

List workspace packages

  1. Confirm the package name pnpm sees.
Terminal
pnpm -r ls --depth -1

Fix the glob or the name

  1. Add the directory to pnpm-workspace.yaml packages.
  2. Align the dependency name with the package name field.
pnpm-workspace.yaml
packages:
  - 'apps/*'
  - 'packages/*'

How to prevent it

  • Keep pnpm-workspace.yaml globs covering every package and update dependents after any rename.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →