-
Notifications
You must be signed in to change notification settings - Fork 75
nvm use fails even after installing the version #226
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
Comments
Are you using the latest Fish as well? How did you install nvm.fish? |
I'm currently using Fish shell version 3.7.1 I installed using |
What is the actual Node version after installing v22 with nvm? Can you try installing other versions (just to check)? Do you also happen to have a system Node installation, and if so, how did you install it? |
I do not have a system Node installation, as I previously used brew:nvm before switching to fish shell and uninstalling brew:nvm.
|
Can you make sure that you're running the latest nvm.fish? If you are, see if the code matches what's in this repo jorgebucaran/nvm.fish/tree/main/functions/*. This issue is really odd, and I have no idea what's causing it. I couldn't reproduce the problem on my end either. Also, let's take a look at your config.fish or any custom conf.d/ snippets you have. And what plugins are you using? |
config.fish
I have compare main branch of the nvm.fish repository on GitHub with my local ~/.config/fish directory and found them to be identical.
|
Intriguing. For the other questions, I'm going to assume you're only using Fisher and Now, if you want to tackle it yourself, you'll need to uninstall nvm.fish first, clone this repo, install your clone with fisher install path/to/clone and then start inserting echo statements in the Let me know how you would like to proceed. |
Ran into this same issue on an employees WSL ubuntu fresh install (also didn't have a system node, v12.x.x from apt repo is pretty much useless in this situation). For anyone else, (very) temporary/jank fix is just to add I tried to reproduce this as well with no luck, and I had just so happened to do 2 fresh debian installs in the past week that both were setup with nvm, fish, fisher and this was the only one that had this issue. |
Thanks. Can't repro as well. This is most definitely an issue on the user's end, not with nvm.fish, which has been pretty much stable for years. I'm happy to hop on a call with @NV4RE or @PThorpe92 to help debug since I don't have access to a system with the issue. |
I've identified the underlying issue: The regex pattern "v\d.+" used to match version directories is overly broad and can mistakenly match usernames containing "v" followed by digits. For example, my username "nv4re" triggers a false match, causing the entire path "/Users/nv4re/.local/share/nvm/v16.20.2" to be matched instead of just the version directory "v16.20.2". This leads to incorrect output from the |
Great find, wow! If you happen to have a fix, send it over, otherwise, I'll handle this tomorrow. Thank you so much. |
|
Uh oh!
There was an error while loading. Please reload this page.
Description
I am experiencing an issue with
nvm.fish
where I am unable to use a Node version even after installing it. Here are the steps I followed:nvm install latest
.nvm use v22.7.0
, but received the error message "nvm: Can't use Node 'v22.7.0', version must be installed first".nvm use v22
andnvm use 22
, but received the same error message.~/.local/share/nvm/
directory.Expected Behavior
After installing a Node version using
nvm install
, I should be able to use it withnvm use
.Actual Behavior
Even after installing the version, I receive an error message stating that the version must be installed first.
Environment
nvm.fish
version: latestSteps to Reproduce
nvm install latest
.nvm use v22.7.0
.~/.local/share/nvm/
directory.Additional Information
I have attached the output of the
ls -la ~/.local/share/nvm/
command, which shows that the version is indeed installed.Noted that
nvm list
give empty resultI would appreciate any help in resolving this issue. Thank you
The text was updated successfully, but these errors were encountered: