nvm-windows icon indicating copy to clipboard operation
nvm-windows copied to clipboard

Feature request: setting a "default" version with the ability to change to the "default" version

Open b-strauss opened this issue 5 years ago • 14 comments

We have nvm on a Windows Server system with several node versions installed. In our CI we need a special version for certain configurations, but only for a handful. Most (95%) of our configurations can use the same version. It would be great to have the possibility to set a "default" version in nvm, something like nvm set_default 10.16.0. And then on whatever version you are, after the build script with the special version is done you can change back to the "default" one with another command, e.g.: nvm use default. Currently we have to set the version in every build script, even if 95% of the time it's the same version.

b-strauss avatar Jul 16 '19 15:07 b-strauss

or may be use the same command as in nvm nvm alias default 10.16.0

nishants avatar Feb 18 '20 05:02 nishants

I am having the same issue, running nvm alias default 14.15.1:

Running version 1.1.7.

Usage:

  nvm arch                     : Show if node is running in 32 or 64 bit mode.
  nvm install <version> [arch] : The version can be a node.js version or "latest" for the latest stable version.
                                 Optionally specify whether to install the 32 or 64 bit version (defaults to system arch).
                                 Set [arch] to "all" to install 32 AND 64 bit versions.
                                 Add --insecure to the end of this command to bypass SSL validation of the remote download server.
  nvm list [available]         : List the node.js installations. Type "available" at the end to see what can be installed. Aliased as ls.
  nvm on                       : Enable node.js version management.
  nvm off                      : Disable node.js version management.
  nvm proxy [url]              : Set a proxy to use for downloads. Leave [url] blank to see the current proxy.
                                 Set [url] to "

csalmeida avatar Dec 01 '20 16:12 csalmeida

Is there any update on this? I am running into the same issue on Windows.

nvm alias default <version> is not recognized as a command, and nvm keeps loading the first version of Node that was installed whenever I restart my PC. If I run nvm use <version>, it keeps using it (even on new terminals) until the next restart.

NoMercy235 avatar Jun 10 '21 07:06 NoMercy235

or may be use the same command as in nvm nvm alias default 10.16.0

This works only for Linux version of NVM...

ariadne-github avatar Sep 03 '21 14:09 ariadne-github

Is there still no nvm alias default equivalent?

blasco avatar Jul 17 '22 07:07 blasco

Hello,

I switched from WSL ZSH to PowerShell and I am currently facing the same problem. nvm alias default is not recognized.

i-zanis avatar Jul 22 '22 11:07 i-zanis

NVM for Windows does not have custom aliases, which is why this is labeled as an enhancement request.

coreybutler avatar Jul 22 '22 11:07 coreybutler

I would also very much like this. I don't want to remember what version my project needs.

Lunatunny avatar Nov 09 '22 03:11 Lunatunny

Is there still no way to set the default for windows?

hossam37x avatar Feb 12 '23 09:02 hossam37x

Also interested in this. No way to set default?

tiagofemavivo avatar Feb 16 '23 13:02 tiagofemavivo

still rooting for this feature 😥

sanzserif avatar Aug 22 '23 06:08 sanzserif

Having this functionality built in would be very helpful!

Fantantonio avatar Dec 12 '23 09:12 Fantantonio

I get this error too. Even though I changed node version with nvm with nvm alias default v20, I still need to change again after my laptop shutdown. Any possible solution?

htutwaiphyoe avatar Jan 22 '24 05:01 htutwaiphyoe

After many years of keeping an eye on it, I changed version manager for Windows (nvs, or volta)

ShinobiWPS avatar Feb 18 '24 18:02 ShinobiWPS