Nvm: Cannot install node using nvm | nvm ls-remote returns N/A

Created on 26 Apr 2019  路  10Comments  路  Source: nvm-sh/nvm

  • Operating system and version: Mac OS Mojave 10.14.3

  • nvm debug output:


    nvm debug
    nvm --version: v0.33.11
    $TERM_PROGRAM: iTerm.app
    $SHELL: /bin/bash
    $SHLVL: 1
    $HOME: /Users/wasif
    $NVM_DIR: '$HOME/.nvm'
    $PATH: $HOME/go/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin
    $PREFIX: ''
    $NPM_CONFIG_PREFIX: ''
    $NVM_NODEJS_ORG_MIRROR: ''
    $NVM_IOJS_ORG_MIRROR: ''
    shell version: 'GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin18)'
    uname -a: 'Darwin 18.2.0 Darwin Kernel Version 18.2.0: Thu Dec 20 20:46:53 PST 2018; root:xnu4903.241.1~1/RELEASE_X86_64 x86_64'  
    OS version: Mac 10.14.3 18D42
    curl: /usr/bin/curl, curl 7.54.0 (x86_64-apple-darwin18.0) libcurl/7.54.0 LibreSSL/2.6.4 zlib/1.2.11 nghttp2/1.24.1
    wget: /usr/local/bin/wget, GNU Wget 1.20.3 built on darwin18.2.0.
    git: /usr/local/bin/git, git version 2.21.0
    grep: /usr/bin/grep, grep (BSD grep) 2.5.1-FreeBSD
    awk: /usr/bin/awk, awk version 20070501
    sed: illegal option -- -
    usage: sed script [-Ealn] [-i extension] [file ...]
         sed [-Ealn] [-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]] [-J replstr]
               [-L number] [-n number [-x]] [-P maxprocs] [-s size]
               [utility [argument ...]]
    xargs: /usr/bin/xargs,
    nvm current: none
    which node:
    which iojs:
    which npm:
    npm config get prefix: -bash: npm: command not found
    npm root -g: -bash: npm: command not found
    

  • nvm ls output:


    N/A
    node -> stable (-> N/A) (default)
    iojs -> N/A (default)
    lts/* -> lts/dubnium (-> N/A)
    lts/argon -> v4.9.1 (-> N/A)
    lts/boron -> v6.17.1 (-> N/A)
    lts/carbon -> v8.16.0 (-> N/A)
    lts/dubnium -> v10.15.3 (-> N/A)
    

  • How did you install nvm? (e.g. install script in readme, Homebrew): Install script in readme with 0.33.11

  • What steps did you perform?
    Installed nvm
    Added nvm to path as specified

  • What happened?
    Nvm install is not working
    nvm install node is not working
    nvm install 8 is not working
    Nvm ls-remote returns n/a

  • What did you expect to happen?
    NVM should install a node version (any node verison)

  • Is there anything in any of your profile files (.bashrc, .bash_profile, .zshrc, etc) that modifies the PATH?
    export PATH=$GOPATH/bin:$PATH

non-issue / invalid

Most helpful comment

1: nvm install node

2: nvm install iojs

3: nvm ls-remote

All 10 comments

It seems like you ignored the one part of the issue template that鈥檚 relevant to your problem :-)

If you are having installation issues, or getting "N/A", what does curl -I --compressed -v https://nodejs.org/dist/ print out?

Ah! My bad.

wasif$ curl -I --compressed -v https://nodejs.org/dist/
*   Trying 104.20.22.46...
* TCP_NODELAY set
* Connected to nodejs.org (104.20.22.46) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/cert.pem
  CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS change cipher, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-CHACHA20-POLY1305
* ALPN, server accepted to use h2
* Server certificate:
*  subject: OU=Domain Control Validated; OU=PositiveSSL Wildcard; CN=*.nodejs.org
*  start date: Aug 14 00:00:00 2017 GMT
*  expire date: Nov 20 23:59:59 2019 GMT
*  subjectAltName: host "nodejs.org" matched cert's "nodejs.org"
*  issuer: C=GB; ST=Greater Manchester; L=Salford; O=COMODO CA Limited; CN=COMODO 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 0x7fd2cd801a00)
> HEAD /dist/ HTTP/2
> Host: nodejs.org
> User-Agent: curl/7.54.0
> Accept: */*
> Accept-Encoding: deflate, gzip
>
* Connection state changed (MAX_CONCURRENT_STREAMS updated)!
< HTTP/2 200
HTTP/2 200
< date: Mon, 29 Apr 2019 03:35:19 GMT
date: Mon, 29 Apr 2019 03:35:19 GMT
< content-type: text/html
content-type: text/html
< set-cookie: __cfduid=d9285acc799fc730016e9c975fc1739491556508918; expires=Tue, 28-Apr-20 03:35:18 GMT; path=/; domain=.nodejs.org; HttpOnly
set-cookie: __cfduid=d9285acc799fc730016e9c975fc1739491556508918; expires=Tue, 28-Apr-20 03:35:18 GMT; path=/; domain=.nodejs.org; HttpOnly
< cf-cache-status: EXPIRED
cf-cache-status: EXPIRED
< expires: Mon, 29 Apr 2019 07:35:19 GMT
expires: Mon, 29 Apr 2019 07:35:19 GMT
< cache-control: public, max-age=14400
cache-control: public, max-age=14400
< 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: 4cee39a6188f2d11-KUL
cf-ray: 4cee39a6188f2d11-KUL
< content-encoding: gzip
content-encoding: gzip

that all seems normal. can you elaborate on what "not working" means? does nvm ls-remote node print out a version? what error do you get when you run nvm install node?

I can't install any version of node. I get the error below. I have tried to run nvm ls-remote which returns N/A. I have tried re-installing nvm, using the NVM_NODEJS_ORG_MIRROR set to a different and double-checked my certificates.

Below you can see the result for nvm install node, nvm ls, nvm ls-remote

wasif$ nvm install node
Version 'node' not found - try `nvm ls-remote` to browse available versions.
wasif$ nvm ls

->       system
node -> stable (-> N/A) (default)
iojs -> N/A (default)
lts/* -> lts/dubnium (-> N/A)
lts/argon -> v4.9.1 (-> N/A)
lts/boron -> v6.17.1 (-> N/A)
lts/carbon -> v8.16.0 (-> N/A)
lts/dubnium -> v10.15.3 (-> N/A)
wasif$ nvm ls-remote
            N/A

I have exhausted all my options. I don't know what else to do :(

hmm, actually it's weird that your curl command didn't end with * Connection #0 to host nodejs.org left intact. I assume if you visit https://nodejs.org/dist/ in your browser you see content?

Yeah. The entire index of distributions

Do you have a ~/.curlrc or any env vars that might affect curl's operation? Can you try in Terminal (ie, not just in iTerm)?

Hey!

Thanks so much for this. I finally was able to look into this and troubleshoot it based on environment variables. The problem was caused by the ordering of the variables in my PATH value.

For some reason during the installation of go the PATH was set to

export PATH=$GOPATH/bin:$PATH

As opposed to

export PATH=$PATH:$GOPATH/bin

1: nvm install node

2: nvm install iojs

3: nvm ls-remote

1: nvm install node

2: nvm install iojs

3: nvm ls-remote

Amazing dude, thank you

Was this page helpful?
0 / 5 - 0 ratings