Repository: nvm
Issue: unable to update node version after deleting prefix
Labels: needs followup

<!-- Thank you for being interested in nvm! Please help us by filling out the following form if you‘re having trouble. If you have a feature request, or some other question, please feel free to clear out the form. Thanks! -->

#### Operating system and version:

#### `nvm debug` output:
<details>
<!-- do not delete the following blank line -->

```sh
nvm --version: v0.33.11
$TERM_PROGRAM: iTerm.app
$SHELL: /bin/zsh
$SHLVL: 1
$HOME: /Users/tyleradams
$NVM_DIR: '$HOME/.nvm'
$PATH: /usr/local/opt/openssl/bin:/usr/local/bin:/usr/local/sbin:$HOME/bin:/Applications/Postgres.app/Contents/Versions/latest/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:$HOME/.rvm/gems/ruby-2.3.3/bin:$HOME/.rvm/gems/ruby-2.3.3@global/bin:$HOME/.rvm/rubies/ruby-2.3.3/bin:/usr/local/opt/openssl/bin:/usr/local/bin:/usr/local/sbin:$HOME/bin:$NVM_DIR/versions/node/v11.15.0/bin:/Applications/Postgres.app/Contents/Versions/latest/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Applications/Postgres.app/Contents/Versions/latest/bin:$HOME/.rvm/bin:$HOME/.rvm/bin
$PREFIX: ''
$NPM_CONFIG_PREFIX: ''
$NVM_NODEJS_ORG_MIRROR: ''
$NVM_IOJS_ORG_MIRROR: ''
shell version: 'zsh 5.8 (x86_64-apple-darwin20.0)'
uname -a: 'Darwin 20.3.0 Darwin Kernel Version 20.3.0: Thu Jan 21 00:07:06 PST 2021; root:xnu-7195.81.3~1/RELEASE_X86_64 x86_64'
OS version: macOS 11.2.3 20D91
curl: /usr/bin/curl, curl 7.64.1 (x86_64-apple-darwin20.0) libcurl/7.64.1 (SecureTransport) LibreSSL/2.8.3 zlib/1.2.11 nghttp2/1.41.0
wget: not found
git: /usr/bin/git, git version 2.24.3 (Apple Git-128)
grep: grep: aliased to grep  --color=auto --exclude-dir={.bzr,CVS,.git,.hg,.svn} (grep --color=auto --exclude-dir={.bzr,CVS,.git,.hg,.svn}), grep (BSD grep) 2.5.1-FreeBSD
awk: /usr/bin/awk, awk version 20200816
sed: illegal option -- -
usage: sed script [-Ealnru] [-i extension] [file ...]
	sed [-Ealnu] [-i extension] [-e script] ... [-f script_file] ... [file ...]
sed: /usr/bin/sed,
cut: illegal option -- -
usage: cut -b list [-n] [file ...]
       cut -c list [file ...]
       cut -f list [-s] [-d delim] [file ...]
cut: /usr/bin/cut,
basename: illegal option -- -
usage: basename string [suffix]
       basename [-a] [-s suffix] string [...]
basename: /usr/bin/basename,
rm: illegal option -- -
usage: rm [-f | -i] [-dPRrvW] file ...
       unlink file
rm: /bin/rm,
mkdir: illegal option -- -
usage: mkdir [-pv] [-m mode] directory ...
mkdir: /bin/mkdir,
xargs: illegal option -- -
usage: xargs [-0opt] [-E eofstr] [-I replstr [-R replacements] [-S replsize]]
             [-J replstr] [-L number] [-n number [-x]] [-P maxprocs]
             [-s size] [utility [argument ...]]
xargs: /usr/bin/xargs,
nvm current: system
which node: /usr/local/bin/node
which iojs: iojs not found
which npm: /usr/local/bin/npm
npm config get prefix: $NVM_DIR/versions/node/v11.15.0
npm root -g: $NVM_DIR/versions/node/v11.15.0/lib/node_modules
```
</details>

#### `nvm ls` output:
<details>
<!-- do not delete the following blank line -->

```sh
 v8.17.0
        v9.11.1
        v9.11.2
        v10.0.0
       v10.12.0
       v10.13.0
       v10.16.0
       v11.10.0
       v11.15.0
       v12.13.0
       v12.18.3
       v12.19.1
->       system
default -> 9 (-> v9.11.2)
node -> stable (-> v12.19.1) (default)
stable -> 12.19 (-> v12.19.1) (default)
iojs -> N/A (default)
lts/* -> lts/fermium (-> N/A)
lts/argon -> v4.9.1 (-> N/A)
lts/boron -> v6.17.1 (-> N/A)
lts/carbon -> v8.17.0
lts/dubnium -> v10.24.1 (-> N/A)
lts/erbium -> v12.22.1 (-> N/A)
lts/fermium -> v14.16.1 (-> N/A)
```
</details>

#### How did you install `nvm`?
<!-- (e.g. install script in readme, Homebrew) -->
Via script

#### What steps did you perform?
Running `nvm install <version>` or `nvm use <version>`  or these without specifying version in a dir with a nvmrc file
#### What happened?
Output: 
```
Found '/Users/jkfdljfas/Code/project/.nvmrc' with version <v11.15.0>
Now using node v11.15.0 (npm v6.14.8)
```
Then I run `node -v`, and the output is:

```
v14.14.0
```
#### What did you expect to happen?
I expect the node version to reflect the nvm install/use command I just ran , ie `v11.15.0`

#### Is there anything in any of your profile files that modifies the `PATH`?
<!--  (e.g. `.bashrc`, `.bash_profile`, `.zshrc`, etc) -->
.zshrc
```
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
````

Note that I recently ran something similar to:
```
$ npm config delete prefix 
$ npm config set prefix $NVM_DIR/versions/node/v6.11.1
```
from this SO answer: https://stackoverflow.com/a/47861348/3056056. I was trying to get rid of the prefix warning I was getting every time I ran nvm use. Prior to running that nvm was working fine (aside from the prefix warning.)

Any help would be much appreciated. I may just need to uninstall and reinstall nvm.