Describe the bug
We're using Github package registry for our internal packages. When I'm trying to add a package that worked with Yarn v1 I get Response code 400 (Bad Request). I used yarn npm login --scope my-company to auth against the registry.
To Reproduce
.yarnrc.yml
yarnPath: .yarn/releases/yarn-sources.js
npmScopes:
my-company:
npmRegistryServer: "https://npm.pkg.github.com"
$ yarn set version from sources
$ yarn npm whoami --scope my-company
➤ YN0000: Santas
➤ YN0000: Done in 0.69s
$ yarn add @my-company/ui-components
...
➤ YN0000: ┌ Fetch step
➤ YN0013: │ @my-company/ui-components@npm:20.0.0::__archiveUrl=https%3A%2F%2Fnpm.pkg.github.com%2Fdownload%2F%40my-company%2Fui-components%2F20.0.0%2F61118bd63abe1f7f4f8a6081e0002c9db9cf65e53043894ea4bb2a1fa06890a6 can't be found in the cache and will be fetched from the remote server
➤ YN0001: │ HTTPError: @my-company/ui-components@npm:20.0.0::__archiveUrl=https%3A%2F%2Fnpm.pkg.github.com%2Fdownload%2F%40my-company%2Fui-components%2F20.0.0%2F61118bd63abe1f7f4f8a6081e0002c9db9cf65e53043894ea4bb2a1fa06890a6: Response code 400 (Bad Request)
at EventEmitter.l.on (/Users/santas/my-company/my-project/.yarn/releases/yarn-sources.js:24:310187)
at process._tickCallback (internal/process/next_tick.js:68:7)
➤ YN0000: └ Completed in 1.59s
➤ YN0000: Failed with errors in 2.9s
Environment if relevant (please complete the following information):
I installed Yarn Berry today but also hitting this issue.
The difference to then configuration above is that I have an auth token defined in a global .yarnrc.yml located under ~.
Is that an unsupported scenario?
@levrik Yes, it should be supported. It just got fixed yesterday tho.
Can you try it out with the latest source version?
yarn set version from sources
@deini Okay, seems to work now. Thanks!
Most helpful comment
@deini Okay, seems to work now. Thanks!