-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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 doesn't use specified registry for yarn install #2508
Comments
Have you tried to set yarns config for the registry? $ yarn config get registry
# output?
# change with:
$ yarn config set registry your-registry.com |
What I've found is that you have to regenerate or modify your |
@sharedprophet it works for me! |
Something like this would be a great thing to include in the error message. |
Windows
error An unexpected error occurred: "EINVAL: invalid argument, mkdir 'C:\Users\ahmet\http:\localhost:8080'". |
How should we regenerate the lock file? Delete and |
I can't believe this issue has existed for 4 years. |
|
For those who are coming back to this issue:
you can always verify if it works with hope it helps - I just fixed my problem and works like a charm with my company's nexus (with authentication). |
Experienced this issue too: @nCore That's not a full solution to this problem, since deleting your yarn.lock (and recreating) could result in other results (e.g. downloading a version 1.1 instead of 1.0 (or 1.0.5 instead of 1.0.4), depending on how "exact" you set your version (see https://docs.npmjs.com/cli/v8/configuring-npm/package-json#dependencies) @WhiteMinds #3330 was closed in favor of #5892, which was closed too with the comment (#5892 (comment)):
Haven't tested in yarn 2 (and also no time), but it seems that this is what we want ("Remove hostnames from the lockfiles"), so maybe this issue will come to an end, since there is no chance for yarn 1.x to get this resolved. |
Not work for me. I had to specify registry in every command: https://stackoverflow.com/questions/55192898/yarn-wont-use-specified-registry
|
How can I make it fetch from new .npmrc registry changes. |
If you are switching registries do |
Why is this closed? It doesn't work. And it's not a clean solution to just say "delete the yarn.lock" file. The yarn.lock is there for a purpose. To delete it could harm the integrity of the project. To edit it manually could also produce errors. There should be a mechanism automatically pull the new registry details, maybe with a warning... |
I am shocked that this still not work in 2024. > yarn --version
1.22.21
> yarn config get registry
http://mirrors.cloud.tencent.com/npm/
no |
@shyn, it will never be! Please upgrade the yarn to the latest version; you are using an almost half a decade old Yarn version. https://yarnpkg.com/getting-started/install |
Summary: Various fixes/tweaks to the `test-e2e-local` script, impacted by recent changes, found during the release process: - Fix typo in variable name for `circleciToken` arg. - Relocate erroneously positioned `process.exit` call (a force exit around Verdaccio, which we will remove in future). - Add notice on exit around Verdaccio server not being killed successfully (to do in T179377112). - Switch from Yarn to npm for test project installation — Yarn 3 is not respecting `npmRegistryServer`, see yarnpkg/yarn#2508. Changelog: [Internal] Differential Revision: D53951606
Summary: Various fixes/tweaks to the `test-e2e-local` script, impacted by recent changes, found during the release process: - Fix typo in variable name for `circleciToken` arg. - Relocate erroneously positioned `process.exit` call (a force exit around Verdaccio, which we will remove in future). - Add notice on exit around Verdaccio server not being killed successfully (to do in T179377112). - Switch from Yarn to npm for test project installation — Yarn 3 is not respecting `npmRegistryServer`, see yarnpkg/yarn#2508. Changelog: [Internal] Reviewed By: cipolleschi Differential Revision: D53951606
Summary: Various fixes/tweaks to the `test-e2e-local` script, impacted by recent changes, found during the release process: - Fix typo in variable name for `circleciToken` arg. - Relocate erroneously positioned `process.exit` call (a force exit around Verdaccio, which we will remove in future). - Add notice on exit around Verdaccio server not being killed successfully (to do in T179377112). - Switch from Yarn to npm for test project installation — Yarn 3 is not respecting `npmRegistryServer`, see yarnpkg/yarn#2508. Changelog: [Internal] Reviewed By: cipolleschi Differential Revision: D53951606
Summary: Pull Request resolved: #43130 Various fixes/tweaks to the `test-e2e-local` script, impacted by recent changes, found during the release process: - Fix typo in variable name for `circleciToken` arg. - Relocate erroneously positioned `process.exit` call (a force exit around Verdaccio, which we will remove in future). - Add notice on exit around Verdaccio server not being killed successfully (to do in T179377112). - Switch from Yarn to npm for test project installation — Yarn 3 is not respecting `npmRegistryServer`, see yarnpkg/yarn#2508. Changelog: [Internal] Reviewed By: cipolleschi Differential Revision: D53951606 fbshipit-source-id: f6e29ef6c9ab33ebf60124757576fcb54219f339
@yordis I'm using version yarn 4.1.1 but it reproduces. |
Thank you so much! I've spent whole day on this problem... |
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
When I set
npm config set registry my-registry.com
npm fetch packages from my-registry.com when I install single module (npm i express
) and when I install all modules from package.json (npm i
). Yarn goes to my-registry.com only when I typeyarn add express
, but only for express. All others modules downloaded via yarn registry.If the current behavior is a bug, please provide the steps to reproduce.
npm config set registry your-registry.com
yarn install --verbose
What is the expected behavior?
Yarn should fetch all modules from specified registry
Please mention your node.js, yarn and operating system version.
node: 7.4.0
yarn: 0.19.1
os: macOS 10.12.2
The text was updated successfully, but these errors were encountered: