You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(Skipping the PR template since this is a feature request rather than a bug report.)
Feature Request
I use corepack in all my projects. corepack ships with Node by default however since it's experimental, it is still opt-in. To opt-in, you need to run corepack enable once on a fresh node install.
When installing a new version of Node with nvm, I have to manually repeat corepack enable. Sometimes our developers forget, which leads to weird version mismatch errors in our other tooling.
Ultimately, I would like a way to opt-in to corepack across all node versions installed by nvm.
It’s unclear if that default will ever change in node, and I’m very hesitant to make it easy for users to accidentally have corepack (which breaks a number of valid use cases when enabled) enabled.
I’m not sure what solution would work here regardless - we can’t just detect if there’s a corepack binary, because it’s not present in older nodes (and thus could be something else), and I’d prefer not to add another file. I suppose we could use an env var, but that doesn’t seem like it’d work for your use case, because it wouldn’t be easy to set that up on all your devs’ machines.
Overall, I think that until node has a way to default corepack to be enabled, nobody else should.
I can add an environment variable in the login shell profile through our provisioning scripts, though I see the concern with supporting an option to enable corepack across versions when corepack itself doesn't support this. Having this come from corepack or node would also ensure this works with other version managers as well.
I might explore an option to auto enable corepack in our provisioning scripts on shell login then, as long as it doesn't cause a noticeable slow down.
(Skipping the PR template since this is a feature request rather than a bug report.)
Feature Request
I use corepack in all my projects. corepack ships with Node by default however since it's experimental, it is still opt-in. To opt-in, you need to run
corepack enable
once on a fresh node install.When installing a new version of Node with nvm, I have to manually repeat
corepack enable
. Sometimes our developers forget, which leads to weird version mismatch errors in our other tooling.Ultimately, I would like a way to opt-in to corepack across all node versions installed by nvm.
Perhaps we can have something akin to https://github.com/nvm-sh/nvm#default-global-packages-from-file-while-installing but specifically for corepack since it's a first-party node feature? This can eventually be removed once corepack is made opt-out in a future version of NodeJS.
nodejs/corepack#192
The text was updated successfully, but these errors were encountered: