volta icon indicating copy to clipboard operation
volta copied to clipboard

--registry doesn't appear to be respected

Open jamischarles opened this issue 3 years ago • 4 comments

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 Screen Shot 2022-06-26 at 2 41 41 AM 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!

jamischarles avatar Jun 26 '22 08:06 jamischarles

My workaround: https://github.com/jamischarles/til/blob/main/volta/volta-cannot-install-yarn.md

jamischarles avatar Oct 15 '22 01:10 jamischarles

Same problem here. No way to set the registry.

DavidHudlow avatar Jan 26 '24 23:01 DavidHudlow

@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/"
        }
    }
}

jamischarles avatar Jan 27 '24 00:01 jamischarles

Here are some docs that we have for the hooks: https://docs.volta.sh/advanced/hooks

rwjblue avatar Jan 28 '24 14:01 rwjblue