Nvm-windows: Alias for latest lts/non-lts/major

Created on 24 Oct 2018  ·  4Comments  ·  Source: coreybutler/nvm-windows

My Environment

  • [ ] Windows 7 or below (not truly supported due to EOL - see wiki for details)
  • [ ] Windows 8
  • [ ] Windows 8.1
  • [x] Windows 10
  • [ ] Windows 10 IoT Core
  • [ ] Windows Server 2012
  • [ ] Windows Server 2012 R2
  • [ ] Windows Server 2016

  • [ ] My Windows installation is non-English.

I'm using NVM4W version:

  • [x] 1.1.7
  • [ ] 1.1.6
  • [ ] 1.1.5
  • [ ] 1.1.4
  • [ ] 1.1.3
  • [ ] 1.1.2
  • [ ] 1.1.1
  • [ ] Older
  • [ ] OTHER (Please Specify)

I have already...

  • [x] read the README to be aware of npm gotchas & antivirus issues.
  • [x] reviewed the wiki to make sure my issue hasn't already been resolved.
  • [x] verified I'm using an account with administrative privileges.
  • [x] searched the issues (open and closed) to make sure this isn't a duplicate.
  • [x] made sure this isn't a question about how to use NVM for Windows, since gitter is used for questions and comments.

My issue is related to (check only those which apply):

  • [ ] settings.txt
  • [ ] proxy support (Have you tried version 1.1.0+?)
  • [ ] 32 or 64 bit support (Have you tried version 1.1.3+?)
  • [ ] Character escaping (Have you tried version 1.1.6+?)
  • [ ] A standard shell environment (terminal/powershell)
  • [ ] A non-standard shell environment (Cmder, Hyper, Cygwin, git)

Expected Behavior

I tried to install with nvm install, nvm install node and nvm install latest. I would expect one of these to install the latest version of Node.js. I would also expect nvm install 10 to install the latest 10.x.

Fixing nvm install node would be in line with nvm even though it is a different thing - it is what mac/linux people use in place of nvm4w and having (mostly) identical commands will reduce confusion.

Actual Behavior

When I run nvm install node, it says:

node.0.0
Node.js vnode.0.0 is only available in 32-bit.

When I run nvm install 10 it installs 10.0.0, which might not what one woud expect.

Steps to reproduce the problem:

Try the commands mentioned.

Most helpful comment

I believe that I have the same request/issue/feature... I would really like to use nvm in my nightly build process which would download and install the latest node version as well as USE IT so based on my manual process the first command:
"nvm install latest"
seems to work fine currently getting node version 11.2.0...

However, in order for an eventual automated script to use the latest version it would be really handy to be able to use the command:

"nvm use latest"

It currently appears that nvm simply adds .0.0 to the "latest" parameter and attempts to use an invalid version number of "latest.0.0"...

Can the "nvm use" command be updated to allow for the keyword "latest" instead of a specific version number - to use the highest version currently available on the machine?

All 4 comments

I believe that I have the same request/issue/feature... I would really like to use nvm in my nightly build process which would download and install the latest node version as well as USE IT so based on my manual process the first command:
"nvm install latest"
seems to work fine currently getting node version 11.2.0...

However, in order for an eventual automated script to use the latest version it would be really handy to be able to use the command:

"nvm use latest"

It currently appears that nvm simply adds .0.0 to the "latest" parameter and attempts to use an invalid version number of "latest.0.0"...

Can the "nvm use" command be updated to allow for the keyword "latest" instead of a specific version number - to use the highest version currently available on the machine?

nvm use $(nvm ls) works in powershell

I have already created the following PRs:

However, they seem not to be merged.

nvm use $(nvm ls) works in powershell

Maybe so, but it's important to keep the syntax identical to the original nvm, when working together in one project with folks on a Mac or Linux. That way, there can be no confusion as to what commands to use on nvm.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ctsstc picture ctsstc  ·  3Comments

janpio picture janpio  ·  3Comments

tomByrer picture tomByrer  ·  4Comments

webspecialist picture webspecialist  ·  5Comments

fredericrous picture fredericrous  ·  3Comments