Problem
Phantom dependencies are allowed by the Yarn 1 package manager in use.
It can lead to problems for package consumers that aren't evident in the monorepo tests. For example,
Solution
use a package manager configured to prevent phantom dependencies. Some options:
- pnpm
- Yarn 4 with
nodeLinked: pnpm
- Yarn 4 with
nmHoistingLimits: workspaces
In changing some builds or tests may fail at first. That means they have undeclared dependencies. The solution is just to declare them. For intra-repo deps, the workspace: protocol works well.
Problem
Phantom dependencies are allowed by the Yarn 1 package manager in use.
It can lead to problems for package consumers that aren't evident in the monorepo tests. For example,
Solution
use a package manager configured to prevent phantom dependencies. Some options:
nodeLinked: pnpmnmHoistingLimits: workspacesIn changing some builds or tests may fail at first. That means they have undeclared dependencies. The solution is just to declare them. For intra-repo deps, the
workspace:protocol works well.