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 do not respect registry defined in .npmrc file when workspaces feature is being used #4458

Closed
pablobirukov opened this issue Sep 14, 2017 · 5 comments
Labels
fixed-in-modern This issue has been fixed / implemented in Yarn 2+.

Comments

@pablobirukov
Copy link

Do you want to request a feature or report a bug?
Bug

I have several packages under packages/ directory and have turned on workspaces feature.

What is the current behavior?
After I add "workspaces": [ section to package.json yarn fails with Couldn't find package "X" on the "npm" registry even though I have .npmrc on the root level and in each package with custom registry in it, lock files are here and all of them resolve package X to custom artifactory's URL.

What is the expected behavior?

yarn does not fail and resolves packages from the registry defined in .npmrc

Please mention your node.js, yarn and operating system version.
macOS 10.12.6
node v7.10.0
yarn 1.0.2

@pablobirukov pablobirukov changed the title Yarn do not respect .npmrc file with workspaces feature Yarn do not respect registry defined in .npmrc file when workspaces feature is being used Sep 14, 2017
@thedevelopnik
Copy link

We're having the same issue, more than a year later.

@mohanraj-r
Copy link

This is annoying and unexpected. Some workarounds are documented in https://doppelmutzi.github.io/yarn-workspaces-bug/

@flyon
Copy link

flyon commented Aug 18, 2020

bump. This is quite cumbersome with workspaces that have 30 modules. Copying updates to the npmrc file to each module ... should be a simple fix?

@af-mikecrowe
Copy link

As a workaround, you can update your .yarnrc by running

yarn config set "registry" "https://....."

to define your private registries. Best I can determine, only the actual registry key is defaulted to https://registry.yarnpkg.com -- all other .npmrc fields are included

@paul-soporan
Copy link
Member

Closing as in v2 (where you need to use a .yarnrc.yml file instead) this won't be a problem.

https://yarnpkg.com/getting-started/migration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed-in-modern This issue has been fixed / implemented in Yarn 2+.
Projects
None yet
Development

No branches or pull requests

6 participants