Skip to content

Error and invalid paths when running nvm install #919

Closed
@erikhicks

Description

Issue:
After installing using the nvm-setup executable, nvm install will produce an error.

How To Reproduce:

  1. Download nvm-setup.exe from the 1.1.10 release
  2. Run the installer
  3. Open a PS terminal in a new session
  4. Run nvm install

Expected Behavior:

  • NVM installs the latest version of node

Actual Behavior:

  • An error occurs during processing of files in a path that does not exist.
nvm install --lts
panic: runtime error: slice bounds out of range [:1] with length 0
goroutine 1 [running]:
main.versionNumberFrom({0x120140b0, 0x5})
        C:/Users/corey/OneDrive/Documents/workspace/libraries/oss/coreybutler/nvm-windows/src/nvm.go:496 +0x116
main.getVersion({0x120140b0, 0x5}, {0xd69d26, 0x2}, {0x0, 0x0, 0x0})
        C:/Users/corey/OneDrive/Documents/workspace/libraries/oss/coreybutler/nvm-windows/src/nvm.go:233 +0x367
main.install({0x120140b0, 0x5}, {0xd69d26, 0x2})
        C:/Users/corey/OneDrive/Documents/workspace/libraries/oss/coreybutler/nvm-windows/src/nvm.go:273 +0xbb
main.main()
        C:/Users/corey/OneDrive/Documents/workspace/libraries/oss/coreybutler/nvm-windows/src/nvm.go:87 +0xaea

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions