Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yarn resolutions map package does not work #7680

Open
magicdawn opened this issue Nov 9, 2019 · 5 comments
Open

yarn resolutions map package does not work #7680

magicdawn opened this issue Nov 9, 2019 · 5 comments

Comments

@magicdawn
Copy link

as the doc says resolutons can map package
https://github.com/yarnpkg/rfcs/blob/master/implemented/0000-selective-versions-resolutions.md#mapping-version-specifications-as-well-as-packages-name

  "devDependencies": {
    "@angular/cli": "1.0.3",
    "typescript": "2.2.2"
  },
  "resolutions": {
    "typescript": "my-typescript-fork",
  }

this does not work on yarn(latest) 1.19.1, node 12
just a warning shows

warning Resolution field "<maped-package-name>" has an invalid version entry and may be ignored
@httpete
Copy link

httpete commented May 27, 2021

We see the same on yarn 1.22.10 unfortunately.

@jdmeer
Copy link

jdmeer commented Jul 6, 2021

The link you posted isn't really traditional documentation as much as it's a specification. The section you link to seems to be in the context of a discussion surrounding 'potential alternatives' which were not implemented at the time the doc was written. I came here hoping to find that they had later added it to the spec. No dice it seems 😥

@jodaka
Copy link

jodaka commented Nov 8, 2021

Too bad it doesn't work in real life. Would love to be able to temporary replace original packages with our forks.

@0xtomm
Copy link

0xtomm commented Nov 12, 2021

Solution is to do:

  "devDependencies": {
    "@angular/cli": "1.0.3",
    "typescript": "2.2.2"
  },
  "resolutions": {
-    "typescript": "my-typescript-fork",
+    "typescript": "npm:my-typescript-fork",
  }

@undefined-moe
Copy link

This solution also causes a problem as yarn think this is a external url rather than a npm package, and when I execute yarn upgrade-interactive , It always gives this: (even no updates available)

image

Which is really annoying.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants