Repository: nvm
Issue: OSError: [Errno 2] No such file or directory
Labels: installing node

<!-- 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:
iOS 13.5
#### `nvm debug` output:
<details>
<!-- do not delete the following blank line -->

```sh

nvm debug           
nvm --version: v0.35.3                             
$TERM_PROGRAM: NewTerm                             
$SHELL: /usr/bin/zsh                               
$SHLVL: 1                                          
${HOME}: /var/mobile                               
${NVM_DIR}: '${HOME}/.nvm'                         
${PATH}: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games          
$PREFIX: ''                                        
${NPM_CONFIG_PREFIX}: ''                           
$NVM_NODEJS_ORG_MIRROR: ''                         
$NVM_IOJS_ORG_MIRROR: ''                           
shell version: 'zsh 5.8 (aarch64-apple-darwin)'    
uname -a: 'Darwin 19.5.0 Darwin Kernel Version 19.5.0: Tue Apr 28 22:25:26 PDT 2020; root:xnu-6153.122.1~1/RELEASE_ARM64_T8010 iPhone9,3 arm64 D101AP Darwin'                                                  
OS version: iPhone 13.5 17F75                      
curl: /usr/bin/curl, curl 7.71.1 (aarch64-apple-darwin) libcurl/7.71.1 OpenSSL/1.1.1g zlib/1.2.11 libidn2/2.3.0 libssh2/1.9.0 nghttp2/1.40.0               
wget: not found                                    
sed: /usr/bin/sed                                  
cut: /usr/bin/cut                                  
basename: /usr/bin/basename                        
rm: /usr/bin/rm                                    
mkdir: /usr/bin/mkdir                              
xargs: /usr/bin/xargs                              
git: /usr/bin/git, git version 2.28.0              
grep: /usr/bin/grep, grep (GNU grep) 3.4           
awk: /usr/bin/awk, GNU Awk 5.1.0, API: 3.0         
nvm current: none                                  
which node: node not found                         
which iojs: iojs not found                         
which npm: npm not found                           
npm config get prefix: nvm:199: command not found: npm                                                 
npm root -g: nvm:199: command not found: npm

```
</details>

#### `nvm ls` output:
<details>
<!-- do not delete the following blank line -->

```sh

nvm ls              
            N/A                                    
iojs -> N/A (default)                              
node -> stable (-> N/A) (default)                  
unstable -> N/A (default)                          
lts/* -> lts/erbium (-> N/A)                       
lts/argon -> v4.9.1 (-> N/A)                       
lts/boron -> v6.17.1 (-> N/A)                      
lts/carbon -> v8.17.0 (-> N/A)                     
lts/dubnium -> v10.22.0 (-> N/A)                   
lts/erbium -> v12.18.3 (-> N/A)     

```
</details>

#### How did you install `nvm`?
<!-- (e.g. install script in readme, Homebrew) -->
Install script in readme
#### What steps did you perform?
Run nvm install --lts 
#### What happened?
It errorred
```sh

nvm install --lts   
Installing latest LTS version.                     
Downloading and installing node v12.18.3...        
Downloading https://nodejs.org/dist/v12.18.3/node-v12.18.3-darwin-iPhone9,3.tar.xz...                  
curl: (22) The requested URL returned error: 404   
                                                   
Binary download from https://nodejs.org/dist/v12.18.3/node-v12.18.3-darwin-iPhone9,3.tar.xz failed, trying source.                                         
grep: /var/mobile/.nvm/.cache/bin/node-v12.18.3-darwin-iPhone9,3/node-v12.18.3-darwin-iPhone9,3.tar.xz:
No such file or directory                          
Provided file to checksum does not exist.          
Binary download failed, trying source.             
Downloading https://nodejs.org/dist/v12.18.3/node-v12.18.3.tar.xz...                                   
                                                0.9%                                                1.7%#                                               4.2%###                                             6.7%###                                             8.4%#####                                          11.4%######                                         13.9%#######                                        16.1%########                                       19.6%##########                                     23.0%##########                                     23.9%###########                                    26.4%#############                                  29.1%##############                                 31.5%###############                                35.4%#################                              39.6%###################                            42.6%####################                           45.5%#####################                          48.4%#######################                        53.1%#########################                      56.2%##########################                     58.6%############################                   62.5%##############################                 67.1%###############################                69.4%################################               72.9%##################################             77.3%####################################           80.3%######################################         84.7%########################################       89.5%#########################################      92.2%###########################################    96.5%############################################   99.5%############################################# 100.0%                                                   
Computing checksum with sha256sum                  
Checksums matched!                                 
$>./configure --prefix=/var/mobile/.nvm/versions/node/v12.18.3 <                                       
Traceback (most recent call last):                 
  File "./configure", line 28, in <module>         
    import configure                               
  File "/private/var/mobile/.nvm/.cache/src/node-v12.18.3/files/configure.py", line 1805, in <module>  
    run_gyp(gyp_args)                              
  File "tools/gyp_node.py", line 54, in run_gyp    
    rc = gyp.main(args)                            
  File "tools/gyp/pylib/gyp/__init__.py", line 547,
in main                                            
    return gyp_main(args)                          
  File "tools/gyp/pylib/gyp/__init__.py", line 532,
in gyp_main                                        
    generator.GenerateOutput(flat_list, targets, data, params)                                         
  File "tools/gyp/pylib/gyp/generator/make.py", line 2213, in GenerateOutput                           
    part_of_all=qualified_target in needed_targets)
  File "tools/gyp/pylib/gyp/generator/make.py", line 823, in Write                                     
    self.Pchify))                                  
  File "tools/gyp/pylib/gyp/generator/make.py", line 1218, in WriteSources                             
    cflags = self.xcode_settings.GetCflags(configname)                                                 
  File "tools/gyp/pylib/gyp/xcode_emulation.py", line 554, in GetCflags                                
    sdk_root = self._SdkPath()                     
  File "tools/gyp/pylib/gyp/xcode_emulation.py", line 523, in _SdkPath                                 
    return self._XcodeSdkPath(sdk_root)            
  File "tools/gyp/pylib/gyp/xcode_emulation.py", line 527, in _XcodeSdkPath                            
    sdk_path = self._GetSdkVersionInfoItem(sdk_root, '--show-sdk-path')                                
  File "tools/gyp/pylib/gyp/xcode_emulation.py", line 502, in _GetSdkVersionInfoItem                   
    return GetStdoutQuiet(['xcrun', '--sdk', sdk, infoitem])                                           
  File "tools/gyp/pylib/gyp/xcode_emulation.py", line 1454, in GetStdoutQuiet                          
    stderr=subprocess.PIPE)                        
  File "/usr/local/lib/python2.7/subprocess.py", line 394, in __init__                                 
    errread, errwrite)                             
  File "/usr/local/lib/python2.7/subprocess.py", line 1047, in _execute_child                          
    raise child_exception                          
OSError: [Errno 2] No such file or directory       
nvm: install v12.18.3 failed!
```
#### What did you expect to happen?
It should build successfully 
#### Is there anything in any of your profile files that modifies the `PATH`?
<!--  (e.g. `.bashrc`, `.bash_profile`, `.zshrc`, etc) -->
No
<!-- 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

curl -I --compressed
-v https://nodejs.org/dist/                        
*   Trying 2606:4700:10::6814:162e:443...          
* Connected to nodejs.org (2606:4700:10::6814:162e)
port 443 (#0)                                      
* ALPN, offering h2                                
* ALPN, offering http/1.1                          
* successfully set certificate verify locations:   
*   CAfile: /etc/ssl/certs/cacert.pem              
  CApath: none                                     
* TLSv1.3 (OUT), TLS handshake, Client hello (1):  
* TLSv1.3 (IN), TLS handshake, Server hello (2):   
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions
(8):                                               
* TLSv1.3 (IN), TLS handshake, Certificate (11):   
* TLSv1.3 (IN), TLS handshake, CERT verify (15):   
* TLSv1.3 (IN), TLS handshake, Finished (20):      
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):                                            
* TLSv1.3 (OUT), TLS handshake, Finished (20):     
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384                                                
* ALPN, server accepted to use h2                  
* Server certificate:                              
*  subject: OU=Domain Control Validated; OU=PositiveSSL Wildcard; CN=*.nodejs.org                      
*  start date: Oct 21 00:00:00 2019 GMT            
*  expire date: Jan 18 23:59:59 2022 GMT           
*  subjectAltName: host "nodejs.org" matched cert's
"nodejs.org"                                       
*  issuer: C=GB; ST=Greater Manchester; L=Salford; O=Sectigo Limited; CN=Sectigo RSA Domain Validation Secure Server CA                                    
*  SSL certificate verify ok.                      
* Using HTTP2, server supports multi-use           
* Connection state changed (HTTP/2 confirmed)      
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0                       
* Using Stream ID: 1 (easy handle 0x10600d800)     
> HEAD /dist/ HTTP/2                               
> Host: nodejs.org                                 
> user-agent: curl/7.71.1                          
> accept: */*                                      
> accept-encoding: deflate, gzip                   
>                                                  
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):                                                  
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):                                                  
* old SSL session ID is stale, removing            
* Connection state changed (MAX_CONCURRENT_STREAMS == 256)!                                            
< HTTP/2 200                                       
HTTP/2 200                                         
< date: Wed, 02 Sep 2020 05:54:41 GMT              
date: Wed, 02 Sep 2020 05:54:41 GMT                
< content-type: text/html                          
content-type: text/html                            
< set-cookie: __cfduid=d40b7751b87e2c5208583a9a43043360c1599026081; expires=Fri, 02-Oct-20 05:54:41 GMT; path=/; domain=.nodejs.org; HttpOnly; SameSite=Lax
set-cookie: __cfduid=d40b7751b87e2c5208583a9a43043360c1599026081; expires=Fri, 02-Oct-20 05:54:41 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: 6322                                        
age: 6322                                          
< cf-request-id: 04eefac51d0000c981a13a6200000001  
cf-request-id: 04eefac51d0000c981a13a6200000001    
< 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: 5cc4fa4e9cb9c981-SEA                     
cf-ray: 5cc4fa4e9cb9c981-SEA                       
< content-encoding: gzip                           
content-encoding: gzip                             
                                                   
<                                                  
* Connection #0 to host nodejs.org left intact 

```
</details>