Skip to content
Latchkey

yarn/pnpm "Couldn't find package on the workspace registry" in CI

A package declared a workspace: dependency that does not resolve to any local package. The name does not match a sibling, or the version range excludes the sibling’s actual version, so the workspace "registry" has nothing to satisfy it.

What this error means

Install fails with yarn’s "Couldn’t find package <name> on the 'workspace' registry" (or pnpm’s "no matching version found for <name> in workspace"). The dependency points at a workspace package that is missing, misnamed, or version-mismatched.

yarn output
➤ YN0000: ┌ Resolution step
➤ YN0001: │ Error: @acme/ui@workspace:^2.0.0: Couldn't find package "@acme/ui"
required by "@acme/web" on the "workspace" registry

Common causes

Dependency name does not match a workspace package

The depended-on name (e.g. @acme/ui) does not exactly match any local package’s name field, so workspace resolution finds nothing.

Version range excludes the local version

A workspace:^2.0.0 range cannot resolve a sibling that is at 1.x. The package exists but its version is outside the requested range.

Package outside the workspace globs

If the sibling lives in a directory not covered by the workspaces globs, it is not part of the workspace registry and cannot satisfy the dep.

How to fix it

Align the name and version range

Match the dependency to the sibling’s exact name, and use a range its version satisfies (workspace:* follows whatever the local version is).

package.json
// apps/web/package.json
{
  "dependencies": {
    "@acme/ui": "workspace:*"
  }
}

Confirm the package is in the workspace

  1. Check the sibling’s name field matches the dependency exactly.
  2. Ensure its directory is covered by the root workspaces / pnpm-workspace.yaml globs.
  3. List workspaces (yarn workspaces list / pnpm -r list --depth -1) to confirm discovery.

How to prevent it

  • Prefer workspace:* for intra-repo deps to avoid range mismatches.
  • Keep workspace globs covering every package directory.
  • Keep sibling package name fields stable and referenced exactly.

Related guides

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