You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes nvm use {version} will point to wrong version.
> nvm use 18
Now using Node v23.5.0 (npm 10.9.2) /opt/homebrew/Cellar/node/23.5.0/bin/node
in this case, despite running nvm use 18, nvm wrongly points to node 23.
> nvm use 18
Now using Node v23.5.0 (npm 10.9.2) /opt/homebrew/Cellar/node/23.5.0/bin/node
> nvm use 23
Now using Node v23.3.0 (npm 10.9.0) ~/.local/share/nvm/v23.3.0/bin/node
> nvm use 18
Now using Node v18.12.1 (npm 8.19.2) ~/.local/share/nvm/v18.12.1/bin/nod
this can be workaround by switching to a different version then setting desired version.
System information
on m1 macos
$ nvm --version
nvm, version 2.2.16
$ fish --version
fish, version 3.7.1
$ cat .nvmrc
18.12.1
The text was updated successfully, but these errors were encountered:
I am experiencing the same issue. When I open a new fish terminal in VSCodium (WSL 2.0, Debian 12), nvm seems to assume the last node version set by nvm use is active. However, it actually uses the system node version. I also have to do this workaround described above every time I launch a shell in vscode. I do not have the .nvmrc file @scarf005 prints out, however the env var nvm_current_version seems to be responsible for this mismatch. On opening a new shell it says v22.13.0 but node --version prints v18.0.0.
The issue appears to be due to how a new shell is opened. VSCode seems to initialize the shell differently than the normal Windows terminal does. I don't know if this is something that can be fixed here, or is just how fish behaves when a new "non-login" shell is initialized. I tried fixing this by setting the vscode setting "terminal.external.linuxExec": "wsl --shell-type login" (previously "terminal.external.linuxExec": "wsl"), however this doesn't seem to fix the issue.
This issue seems to be related to #222 since running fish -c "node --version" also prints v18.0.0, even though the fish shell outside uses the correct node v22.13.0.
Problem
Sometimes
nvm use {version}
will point to wrong version.in this case, despite running
nvm use 18
, nvm wrongly points to node 23.this can be workaround by switching to a different version then setting desired version.
System information
on m1 macos
The text was updated successfully, but these errors were encountered: