Repository: nvm
Issue: You have $NVM_DIR set to "/root/.nvm", but that directory does not exist. Check your profile files and environment.
Labels: needs followup

I'm trying to upgrade node. So I installed nvm. Still running on the old version of node. So I uninstalled it. Now running on the nvm version. Except some modules were compiled for old version. Delete node_modules. NPM install. Permission error installing with node-gyp. Google. Someone said you can't use nvm as root. Uninstall NVM. Make another user. Install NVM. Error:

`You have $NVM_DIR set to "/root/.nvm", but that directory does not exist. Check your profile files and environment.`

<!-- 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: 
ubuntu 16

#### `nvm debug` output:
<details>
<!-- do not delete the following blank line -->

```sh
nvm: command not found
```
</details>

#### `nvm ls` output:
<details>
<!-- do not delete the following blank line -->

```sh
nvm: command not found
```
</details>

#### How did you install `nvm`?
i didnt

#### What steps did you perform?

`curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash`

#### What happened?

You have $NVM_DIR set to "/root/.nvm", but that directory does not exist. Check your profile files and environment.

#### What did you expect to happen?

install nvm

#### Is there anything in any of your profile files that modifies the `PATH`?
<!--  (e.g. `.bashrc`, `.bash_profile`, `.zshrc`, etc) -->
probably maybe
<!-- Please remove the following section if it does not apply to you -->
#### If you are having installation issues, or getting "N/A", what does `curl -I --compressed -v https://nodejs.org/dist/` print out?
<details>
<!-- do not delete the following blank line -->

```sh
*   Trying 104.20.23.46...
* Connected to nodejs.org (104.20.23.46) port 443 (#0)
* found 129 certificates in /etc/ssl/certs/ca-certificates.crt
* found 516 certificates in /etc/ssl/certs
* ALPN, offering http/1.1
* SSL connection using TLS1.2 / ECDHE_RSA_AES_128_GCM_SHA256
*        server certificate verification OK
*        server certificate status verification SKIPPED
*        common name: *.nodejs.org (matched)
*        server certificate expiration date OK
*        server certificate activation date OK
*        certificate public key: RSA
*        certificate version: #3
*        subject: OU=Domain Control Validated,OU=PositiveSSL Wildcard,CN=*.nodejs.org
*        start date: Mon, 21 Oct 2019 00:00:00 GMT
*        expire date: Tue, 18 Jan 2022 23:59:59 GMT
*        issuer: C=GB,ST=Greater Manchester,L=Salford,O=Sectigo Limited,CN=Sectigo RSA Domain Validation Secure Server CA
*        compression: NULL
* ALPN, server accepted to use http/1.1
> HEAD /dist/ HTTP/1.1
> Host: nodejs.org
> User-Agent: curl/7.47.0
> Accept: */*
> Accept-Encoding: deflate, gzip
> 
< HTTP/1.1 200 OK
HTTP/1.1 200 OK
< Date: Mon, 08 Feb 2021 20:10:01 GMT
Date: Mon, 08 Feb 2021 20:10:01 GMT
< Content-Type: text/html
Content-Type: text/html
< Connection: keep-alive
Connection: keep-alive
< Set-Cookie: __cfduid=d200ab00463901fee642fdd5f6f2dbdd31612815001; expires=Wed, 10-Mar-21 20:10:01 GMT; path=/; domain=.nodejs.org; HttpOnly; SameSite=Lax
Set-Cookie: __cfduid=d200ab00463901fee642fdd5f6f2dbdd31612815001; expires=Wed, 10-Mar-21 20:10:01 GMT; path=/; domain=.nodejs.org; HttpOnly; SameSite=Lax
< Cache-Control: max-age=14400
Cache-Control: max-age=14400
< CF-Cache-Status: HIT
CF-Cache-Status: HIT
< Age: 4768
Age: 4768
< cf-request-id: 0824dd0116000037faa20c4000000001
cf-request-id: 0824dd0116000037faa20c4000000001
< Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
< Vary: Accept-Encoding
Vary: Accept-Encoding
< Server: cloudflare
Server: cloudflare
< CF-RAY: 61e7fde1be7837fa-IAD
CF-RAY: 61e7fde1be7837fa-IAD
< Content-Encoding: gzip
Content-Encoding: gzip

< 
* Connection #0 to host nodejs.org left intact
```
</details>