Skip to content

Injected dependencies are not recopied after a workspace project is rebuilt #4407

@octogonz

Description

@octogonz

pnpm version: 6.32.2

The real world scenario at my work involves internal company NPM packages with a relationship like this:

A --depends-on--> B --peer-depends-on--> C

...where A and C are in the monorepo, but B is developed in a separate repo and gets installed from an Artifactory private registry. This is a common situation at a big company if most teams work in a monorepo, but we share some packages with other teams who have their own repo.

Code to reproduce the issue:

This is an isolated minimal repro. I substituted @react-navigation/core to avoid involving private packages.

  1. Clone this repository: https://github.com/octogonz/pnpm-issue-4407
  2. pnpm install

In this repro:

  • test-project depends on @react-navigation/core
  • @react-navigation/core has a peer dependency on "react": "*"
  • test-project also depends on "react": "workspace:*"
  • The local workspace project react has version 16.0.0 which should satisfy the peer dependency

Actual behavior:

Progress: resolved 10, reused 10, downloaded 0, added 10, done
 WARN  Issues with peer dependencies found
test-project
└─┬ @react-navigation/core
  └── ✕ missing peer react@"*"
Peer dependencies that should be installed:
  react@"*"

Expected behavior:

The installation should succeed. PNPM should satisfy react@* by creating a symlink to the local workspace package.

Additional information:

  • node -v prints: v14.17.4
  • Windows, macOS, or Linux?: Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Priority

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions