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

  • 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

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 28 (6 by maintainers)

Most upvoted comments

1: nvm install node

2: nvm install iojs

3: nvm ls-remote

export PATH=$PATH:$GOPATH/bin

@wasifhyder thanks! I first updated the nvm version by running:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash

Then @wasifhyder 's update above to my .zcshrc file, followed by: source $HOME/.zshrc nvm ls-remote node nvm install v16.15.1

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 😦

It seems like you ignored the one part of the issue template that’s 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?

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

So this is what worked for me. I had to set the environment variable ALL_PROXY to be able to connect outside of my company’s network. Your proxy variable will probably be different from mine, so you’ll have to find out from your company what proxy to use.

export ALL_PROXY=<your proxy here>

After that, I was able to run this command:

NVM_NODEJS_ORG_MIRROR=http://nodejs.org/dist nvm install 16

For context, this is the error I was getting when trying to run nvm install 16:

Version '16' not found - try `nvm ls-remote` to browse available versions.

And the error I got for nvm ls-remote was:

            N/A

After I set ALL_PROXY and used the command above, I got this output:

Downloading and installing node v16.20.2...
Downloading http://nodejs.org/dist/v16.20.2/node-v16.20.2-darwin-arm64.tar.xz...
######################################################################################################################################################################################################################################################### 100.0%
Computing checksum with shasum -a 256
Checksums matched!
Now using node v16.20.2 (npm v8.19.4)

I had this same problem; it turned out the issue was that Anaconda was in my MacOS shell path and Anaconda installed curl was clobbering system curl. Disabling Anaconda fixed the problem for me.

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)?

123456789

Hey, I just had this problem. I don’t know exactly why it happens, but in my case it’s definitely something wrong with Anaconda. So, I removed it and now nvm is working fine.

SO: macOS Monterey (12.6.8)

Error message:

$ nvm install lts/hydrogen
Version '' (with LTS filter 'hydrogen') not found - try `nvm ls-remote --lts=hydrogen` to browse available versions.

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

How to remove Anaconda 3:

  1. Install the Anaconda-Clean package:
$ conda install anaconda-clean
  1. Run Anaconda-Clean:
$ anaconda-clean
Delete .anaconda? (y/n): y
Backup directory: /Users/jr/.anaconda_backup/2023-08-09T035101
Delete .conda? (y/n): y
Delete .condarc? (y/n): y
Delete .ipynb_checkpoints? (y/n): y
Delete .ipython? (y/n): y
Delete .jupyter? (y/n): y
Delete .matplotlib? (y/n): y
  1. Remove Anaconda directories
$ rm -rf ~/anaconda3

$ rm -rf ~/.anaconda_backup

Yeah. The entire index of distributions