Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

panic: runtime error: index out of range [3] with length 3 #960

Closed
chratschan opened this issue Apr 12, 2023 · 6 comments
Closed

panic: runtime error: index out of range [3] with length 3 #960

chratschan opened this issue Apr 12, 2023 · 6 comments

Comments

@chratschan
Copy link

Issue:
I'm unable to run nvm install from an elevated terminal.

How To Reproduce:

  1. Run the installer, leave everything at defaults.
  2. Type "nvm install latest"
  3. Reach an error.

`panic: runtime error: index out of range [3] with length 3 goroutine 1 [running]:

main.checkVersionExceedsLatest({0x11814ea0, 0x6})
C:/Users/corey/OneDrive/Documents/workspace/libraries/oss/coreybutler/nvm-windows/src/nvm.go:875 +0x220 main.install({0x118140b0, 0x6}, {0xb29d26, 0x2})
C:/Users/corey/OneDrive/Documents/workspace/libraries/oss/coreybutler/nvm-windows/src/nvm.go:308 +0x337
main.main()
C:/Users/corey/OneDrive/Documents/workspace/libraries/oss/coreybutler/nvm-windows/src/nvm.go:87 +0xaea `

Expected Behavior:
The expected behavior would be for it to install the latest version of NPM.

Desktop:

  • OS: Windows 11
@coreybutler
Copy link
Owner

Duplicate #955.

Since this is the 5th duplicate of this issue posted in the last 24 hours, despite the issue being pinned to the top of the issues list, I'm leaving this one open in hopes people will actually look at the issue list before repeatedly posting it.

I know it's impacting people. It is already resolved, but it takes some time to cut a release. I have a product launch for a paid client taking precedence this week. As soon as I have time, I will release v1.1.11. In the meantime, nothing is preventing anyone from running nvm install 19.9.0 to get the latest version.

@chratschan
Copy link
Author

Apologies that I missed it! I just did a google search rather than a github search and little came up. Thanks and apologies once again.

@chratschan
Copy link
Author

That being said nvm install 19.9.0 did give the same error for me. I'll try again next release.

@coreybutler
Copy link
Owner

@chratschan - I didn't mean to target you personally, so apologies if it came across that way. It's just a trend I've seen. If nvm install 19.9.0 is not working, that could be filed as a separate issue. I'm still leaving this open so others see it. I'll close it after the release of 1.1.11.

@coreybutler
Copy link
Owner

1.1.11 is now available in the releases.

@liudonghua123
Copy link

I have the same problems, After I updated nvm, it's ok now.

C:\Users\Liu.D.H>nvm install v20.2.0
panic: runtime error: index out of range [3] with length 3

goroutine 1 [running]:
main.checkVersionExceedsLatest({0x11c12b60, 0x6})
        C:/Users/corey/OneDrive/Documents/workspace/oss/coreybutler/nvm-windows/src/nvm.go:790 +0x220
main.install({0x11c120c8, 0x7}, {0xd6fa65, 0x2})
        C:/Users/corey/OneDrive/Documents/workspace/oss/coreybutler/nvm-windows/src/nvm.go:302 +0x35d
main.main()
        C:/Users/corey/OneDrive/Documents/workspace/oss/coreybutler/nvm-windows/src/nvm.go:87 +0xa69

C:\Users\Liu.D.H>
C:\Users\Liu.D.H>nvm install latest
panic: runtime error: index out of range [3] with length 3

goroutine 1 [running]:
main.checkVersionExceedsLatest({0x1211d3d0, 0x6})
        C:/Users/corey/OneDrive/Documents/workspace/oss/coreybutler/nvm-windows/src/nvm.go:790 +0x220
main.install({0x120120c8, 0x6}, {0xd6fa65, 0x2})
        C:/Users/corey/OneDrive/Documents/workspace/oss/coreybutler/nvm-windows/src/nvm.go:302 +0x35d
main.main()
        C:/Users/corey/OneDrive/Documents/workspace/oss/coreybutler/nvm-windows/src/nvm.go:87 +0xa69

C:\Users\Liu.D.H>
C:\Users\Liu.D.H>nvm version
1.1.9

C:\Users\Liu.D.H>where nvm
C:\Users\Liu.D.H\AppData\Roaming\nvm\nvm.exe

C:\Users\Liu.D.H>nvm version
1.1.11

C:\Users\Liu.D.H>nvm install latest
20.2.0
Downloading node.js version 20.2.0 (64-bit)...
......

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants