close
Skip to content

[rush] Rush install fails when there is a preferred version, possibly only with a peer depedency #1349

@kelseyyoung

Description

@kelseyyoung

Using pnpm 3.5.3 and rush 5.10.0

If you add a library to preferredVersions that has a peer dependency, after an initial rush update any install or update will fail with an "Error: Invalid version"

I don't have an example pushed up to github, but locally I was using react-loadable (which has a peer of react) and so in the pnpm-lock looked like this:

  /react-loadable/5.5.0_react@16.8.6:
    dependencies:
      prop-types: 15.7.2
      react: 16.8.6
    dev: false
    peerDependencies:
      react: '*'
    resolution:
      integrity: sha512-C8Aui0ZpMd4KokxRdVAm2bQtI03k2RMRNzOB+IipV3yxFTSVICv7WoUr5L9ALB5BmKO1iHgZtWM8EvYG83otdg==

My preferredVersions has react-loadable here:

  "preferredVersions": {
    "react-loadable": "5.5.0"
  },

And both are included as dependencies in a package.json. The error I see is:

ERROR: Invalid Version: 5.5.0_react@16.8.6

Removing react-loadable from preferredVersions removes the error, and so I think the issue stems from there

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working as intendedrepro confirmedThe issue comments included repro instructions, and the maintainers reproduced the problem

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Closed

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions