-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[Bug] Resolver supported by Yarn v1 does not work in Yarn v2 #1621
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This issue reproduces on master:
|
Specific package causing problem: https://www.npmjs.com/package/@chakra-ui/styled-system/v/1.0.0-next.6 Specific format causing problem: Updated repro: await expect(packageJsonAndInstall({
dependencies: {
["@types/styled-system__core"]: "npm:@peduarte/styled-system__core",
}
})).resolves.toBeTruthy(); |
Yeah, it's missing a range. Should be |
Thanks, adding a resolution with |
And
|
@Amareis I'm unsure of a command line option that works, but I was able to workaround by:
"resolutions": {
"@types/styled-system__core": "npm:@peduarte/styled-system__core@*"
}
|
Yep, that works! |
BTW, |
Oh, that's really stupid XD Thanks for tip! |
Can someone suggest a workaround to accommodate custom npm tags as shown in the example below? mkdir dummy-repo
cd dummy-repo
yarn init
yarn set version berry
yarn add yarn-custom-tag-poc-dep@legacy_v1 This results in the following error:
Please note that the package install works as expected with Yarn v1. For reference, ❯ yarn -v
1.22.10 |
Couldn't find a combination after a couple of tries. I think it's the |
@mariusmarais Indeed, it is the https://github.com/yarnpkg/berry/blob/master/packages/yarnpkg-core/sources/ProtocolResolver.ts#L8 TAG_REGEXP does not account for Relevant discussion happened here: Underscore was discussed and later fell out along the way. Looks like it was just a miss. |
Afer I run
Maybe I should add a resolver in .yarnrc or somewhere? |
That warning is valid but you can just ignore it |
Running yarn workspaces and using 3 aliases
And sadly receiving this error when running yarn install.
|
This will likely hit a lot of ppl with the release of typescript v4.5, which recommends using lib replacement for a common scenario: The workaround worked for me, but took a while to find this thread. |
Most problems around unrecognized resolvers have been solved in later versions, so I'll close this thread. Please open a new one with a new repro if you still hit it! |
I am trying to install a package, it is: @siedlerchr/types-ol-ext
but I get an error message, see below:
I tried the solution to (#1621 (comment)) put it in package.json as the following but still same problem have some suggestions on how to fix this |
oky, solution for this problem is: |
worked for me in macOS zsh: yarn add a@npm:@a/b@\* notice the escape there for the |
Why was this bug closed? This is still an issue today and not fixed. |
I am having a similar problem with yarn 3. |
Describe the bug
A resolver supported by Yarn 1 is not supported by Yarn 2. I cannot personally parse the error well enough to understand what exactly isn't supported.
To Reproduce
Yarn 1 works:
Yarn 2 does not:
Reproduction
Environment if relevant (please complete the following information):
The text was updated successfully, but these errors were encountered: