-
-
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
yarn install (v4) will fail the first time with packages from private registry (artifactory). #5890
Comments
Same issue |
the following .yarnrc.yml file worked for some reason.
I suspect it has to do with nodeLinker, but I"m not sure. |
same issue too |
I deleted the yarn.lock file and installed the dependencies again and that fixed the error. |
same issue too |
I had a similar issue, yarn v3.6.1, github npm registry. It worked for my .yarnrc.yml :
The package.json for my package looks like:
|
when you yarn install with internal repository it seems to create a yarn.local file containing resolution with __archiveURL pointing to that internal repository, when you cleaned and tried without internal repository it creates a yarn.lock file containing resolution but this time without __archiveURL . Howvere this resolution without archiveURL is still able to be used with internal repository . The fix is to use this sed -i -e "s#https://registry.yarnpkg.com/#{YOUR_CI_REGISTRY}#g" yarn.lock i believe this used to work sed -i -e "/resolved:* .*$/d" yarn.lock which was cleaner but v4 requires resolution. Yarn team any suggestions ? Respository such as artifactory might not have the desired url scheme but it would still be nice to have over ride features for users to get around issues like this. |
This fixed it for me. Check if the yarn.lock has been migrated/converted to the new format. If not, then deleting it and re-running yarn install solves it |
I faced this issue migrating from yarn 1 to yarn 4 with a private npm server (artifactory). My fix was to first update to yarn 2 with |
any update on this issue, I'm facing issue with yarn v3 |
Self-service
Describe the bug
In our project we are currently using yarn v1. We are able to download packages from our private registry (artifactory). Our packages are scoped packages, which means our package.json looks like this:
With yarn v1 everything works fine. Now we want to upgrade to yarn v4. We migrated .npmrc to .yarnrc.yml
and also set yarn version to berry. So far so good. But the first time we run
yarn failed with the following error:
When we remove our own (private) dependencies
and run
yarn install
again, yarn is downloading all packages without any error. After the first run ofyarn install
we can now add our dependencies again:and re-run
yarn install
. NOW the packages from our private registry are downloaded and installed as well. There are no errors.It seems, that only the first time we run
yarn install
there is a problem with installing packages from our registry. The problem is, that this also happens in our gitlab pipelines, which means, we are currently unable to build our app with yarn v4.To reproduce
Create a project containing packages from a private registry using yarn v1.
Upgrade to yarn v4 as described here: https://yarnpkg.com/migration/guide
After running
yarn install
, installation will fail. Remove all packages of your private registry in your package.json, and re-runyarn install
again. Installation will now succeed. Undo your changes in package.json and runyarn install
again.Environment
Additional context
No response
The text was updated successfully, but these errors were encountered: