Skip to content

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

Closed

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.
yarn@1.0.0-20170823.1414
node@6.11.2
osx 10.12.6

Activity

  1. changed the title [-]Selective module resolution #4105 doesn't work with scoped packages[/-] [+]Selective module resolution doesn't work with scoped packages[/+] on Aug 23, 2017
  2. s-panferov commented on Aug 24, 2017

    @s-panferov
    ContributorAuthor

    Started to work on the fix in #4243

  3. kaylie-alexa commented on Aug 24, 2017

    @kaylie-alexa
    Member

    @s-panferov awesome! Thanks for working on this :) let me know if you need any help.

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