Do you want to request a _feature_ or report a _bug_?
feature
What is the current behavior?
In our case, we have:
So our develops use global npm registry (without any configuration) on its own computer, but the CI machine should run yarn install with out local npm registry
The problem is, once a developer run yarn install on its own computer and have the yarn.lock file pushed to git, all packages are resolved to "https://registry.yarnpkg.com/*" which is not accessible on out CI machine, so even when our CI machine has a yarn config set registry {out-local-registry}, yarn tries to fetch packages from registry.yarnpkg.com which causes network errors
If the current behavior is a bug, please provide the steps to reproduce.
We believe such case appears in many teams, it is better to have some methods to avoid it
What is the expected behavior?
It could be nice for yarn install / add to recognize custom registry even if yarn.lock resolves a package eariler
Please mention your node.js, yarn and operating system version.
maybe you can copy the node_modules dir.
copy node_modules isn't a easy way to go due to cross-compile problem, and maybe size problem as well.
Indeed, It's a problem for me too. It's hard for other using another npm mirror/registry(for network speed or something else), which has no need to share that information.
Adding that feature would make yarn more widely usable.
Agreed, we're currently doing a sed to replace registry.yarnpkg.com with the local registry to be able to get around this issue. Copying node_modules doesn't make sense due to native compile modules.
@otakustay The scope of such a feature request would mandate an RFC be submitted to enable further discussions. If you still feel like it, please feel free to head over there and submit this idea 馃槃
Most helpful comment
Agreed, we're currently doing a sed to replace
registry.yarnpkg.comwith the local registry to be able to get around this issue. Copyingnode_modulesdoesn't make sense due to native compile modules.