Skip to content

eliminate phantom dependencies #833

Description

@turadg

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions