1

In oh-my-zsh file I added nvm by changing the line in the .zshrc file.

plugins=(git nvm) // added nvm

so now I see nvm and use it from the terminal

but when I change the version seen below.

enter image description here

Then I close the terminal and open a new one and check the version and it still shows using the previous version! It hasn't kept the change.

New window

enter image description here

user1186050
  • 10,710
  • 18
  • 92
  • 235
  • 1
    See an answer to a similar problem: https://stackoverflow.com/a/24587177/1102322 – PiotrK Jul 02 '20 at 19:20
  • You need to make it to be default version: https://stackoverflow.com/questions/47190861/how-can-the-default-node-version-be-set-using-nvm – Ted Jul 03 '20 at 01:46
  • Can you share your `cat ~/.zshrc` ( the content of .zshrc). Often doing nvm alias default {version to choose} then nvm use default {version} helps. Please check that if it works for you. Often adding `export NVM_DIR=~/.nvm source $(brew --prefix nvm)/nvm.sh` at the end of `.zshrc` helps. or could be an issue with the `PATH` variable. Not sure which one is triggering the issue. But let's inspect all these things. If nothing works please share the contents of `.zshrc`. – moyeen52 Jul 03 '20 at 04:11

1 Answers1

2

try to run this command

nvm i v12.18.1

then

nvm alias default v12.18.1
y.ilsaqa
  • 46
  • 4