Skip to content

Selective module resolution doesn't work with scoped packages #4242

@s-panferov

Description

@s-panferov

#4105 cc @kaylieEB

Do you want to request a feature or report a bug?
Bug

What is the current behavior?

"resolutions": {
  "@types/react": "15.0.22"
}

Result:

Couldn't find any versions for "react" that matches "15.0.22"

The error is that yarn thinks that package @types/react is a path @types/react.

What is the expected behavior?
Yarn should correctly install the dep.

The source of bug is this line. We cannot simply split by / here.

We either have to

  1. Improve parsing rules to properly split scoped packages
  2. Use different package separator
  3. Use some kind of escaping.

Please mention your node.js, yarn and operating system version.
[email protected]
[email protected]
osx 10.12.6

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