volta
volta copied to clipboard
--registry doesn't appear to be respected
Hi folks 👋 . Great work with Volta. Really enjoy using it.
I saw https://github.com/volta-cli/volta/issues/954 and assumed that --registry flags (or .npmrc) would be respected. And this hasn't been an issue for me until today.
Context: My employer blocks the official npm registry completely, and we use our own internal npm mirror.
What I'm seeing
You can see above that I'm specifying the registry (same as my .npmrc) but it seems to ignore that.
What I expect to see Yarn to be installed from the registry specified.
Is this a bug? Regression? Or do I misunderstand how this is supposed to work?
Cheers!
My workaround: https://github.com/jamischarles/til/blob/main/volta/volta-cannot-install-yarn.md
Same problem here. No way to set the registry.
@DavidHudlow Apparently this is how Jon got it working:
~/.volta/hooks.json
{
"yarn": {
"distro": {
"template": "custom-url-registry-here"
},
"latest": {
"prefix": "https://yarnpkg.com/"
},
"index": {
"prefix": "https://npm.yourcustomdomai.com/yarn/"
}
}
}
Here are some docs that we have for the hooks: https://docs.volta.sh/advanced/hooks