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

[Bug] yarn global add ignores registry option #5056

Open
bdwain opened this issue Dec 7, 2017 · 8 comments
Open

[Bug] yarn global add ignores registry option #5056

bdwain opened this issue Dec 7, 2017 · 8 comments
Assignees
Labels

Comments

@bdwain
Copy link
Contributor

bdwain commented Dec 7, 2017

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

What is the current behavior?
yarn global add internal-pkg --registry "internal-url" ignores the registry option

If the current behavior is a bug, please provide the steps to reproduce.
I can't share my private registry, but I've had it working in projects for a while now just by using a .yarnrc file with registry "internal-url" in it. The same url is ignored if used an option for yarn global add.

What is the expected behavior?
yarn global add should respect the registry option

Please mention your node.js, yarn and operating system version.
node 8.9.0
yarn 1.3.2
OS X Sierra

It seems like the registry option works fine for yarn add. Just not yarn global add.

@ghost ghost assigned torifat Dec 7, 2017
@ghost ghost added the triaged label Dec 7, 2017
@guldskog
Copy link

@bdwain same issue for me. Any response or solutions?

@bdwain
Copy link
Contributor Author

bdwain commented Jan 24, 2020

not really no. i just manually fix it when this happens

@joeljeske
Copy link

@torifat any chance of fixing yarn global to respect the common flags like --registry?

@bdwain what do you mean you "manually fix it"? I can't find a good way to install global packages from my internal registry.

@bdwain
Copy link
Contributor Author

bdwain commented Feb 11, 2020

Oh sorry I mixed this up with another issue. I just use npm install -g

@joeljeske
Copy link

Ha! Ok, thanks for the info. Whatever gets the job done.

Yarn maintainers: seems like yarn global add is broken if the way to use it is to use npm instead..

@sodatea
Copy link

sodatea commented May 11, 2020

Workaround:

npm_config_registry=YOUR_NPM_REGISTRY_HERE yarn global add SOME_PACKAGE

@hellojukay
Copy link

@sodatea thank you, this works for me.

@Kingwl
Copy link

Kingwl commented Jul 5, 2022

ping 👀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants