() ()
curl: /usr/bin/curl, curl 7.79.1 (x86_64-pc-linux-gnu) libcurl/7.79.1 OpenSSL/1.1.1l zlib/1.2.11 brotli/1.0.9 zstd/1.5.0 libidn2/2.3.2 libpsl/0.21.1 (+libidn2/2.3.0) libssh2/1.9.0 nghttp2/1.45.0
wget: /usr/bin/wget, GNU Wget 1.21.1 built on linux-gnu.
git: /usr/bin/git, git version 2.33.0
grep: grep: aliased to grep --color=tty -d skip (grep --color=tty -d skip), grep (GNU grep) 3.7
awk: /usr/bin/awk, GNU Awk 5.1.0, API: 3.0 (GNU MPFR 4.1.0-p13, GNU MP 6.2.1)
sed: /usr/bin/sed, sed (GNU sed) 4.8
cut: /usr/bin/cut, cut (GNU coreutils) 9.0
basename: /usr/bin/basename, basename (GNU coreutils) 9.0
rm: /usr/bin/rm, rm (GNU coreutils) 9.0
mkdir: /usr/bin/mkdir, mkdir (GNU coreutils) 9.0
xargs: /usr/bin/xargs, xargs (GNU findutils) 4.8.0
nvm current: v10.24.0
which node:
/versions/node/v10.24.0/bin/npm
npm config get prefix: npm WARN npm npm does not support Node.js v10.24.0
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can
t make any promises that npm will work with this version.
npm WARN npm You can find the latest version at https://nodejs.org/
iojs-v1.0.0
iojs-v1.0.1
iojs-v1.0.2
iojs-v1.0.3
iojs-v1.0.4
iojs-v1.1.0
iojs-v1.2.0
iojs-v1.3.0
iojs-v1.4.1
iojs-v1.4.2
iojs-v1.4.3
iojs-v1.5.0
iojs-v1.5.1
iojs-v1.6.0
iojs-v1.6.1
iojs-v1.6.2
iojs-v1.6.3
iojs-v1.6.4
iojs-v1.7.1
iojs-v1.8.1
iojs-v1.8.2
iojs-v1.8.3
iojs-v1.8.4
iojs-v2.0.0
iojs-v2.0.1
iojs-v2.0.2
iojs-v2.1.0
iojs-v2.2.0
iojs-v2.2.1
iojs-v2.3.0
iojs-v2.3.1
iojs-v2.3.2
iojs-v2.3.3
iojs-v2.3.4
iojs-v2.4.0
iojs-v2.5.0
iojs-v3.0.0
iojs-v3.1.0
iojs-v3.2.0
iojs-v3.3.0
iojs-v3.3.1
What did you expect to happen?
List of available node versions to install.
If you are having installation issues, or getting "N/A", what does curl -I --compressed -v https://nodejs.org/dist/
print out?
curl -I --compressed -v $NVM_NODEJS_ORG_MIRROR
* Trying 104.20.23.46:443...
* Connected to nodejs.org (104.20.23.46) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
* 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 multiplexing
* 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 0x55750a47a8d0)
> HEAD /dist HTTP/2
> Host: nodejs.org
> user-agent: curl/7.79.1
> accept: */*
> accept-encoding: deflate, gzip, br, zstd
* 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 301
HTTP/2 301
< date: Wed, 03 Nov 2021 17:37:46 GMT
date: Wed, 03 Nov 2021 17:37:46 GMT
< content-type: text/html
content-type: text/html
< location: https://nodejs.org/dist/
location: https://nodejs.org/dist/
< cache-control: max-age=14400
cache-control: max-age=14400
< cf-cache-status: HIT
cf-cache-status: HIT
< age: 217
age: 217
< 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: 6a875f56ccda39ad-SEA
cf-ray: 6a875f56ccda39ad-SEA
Connection #0 to host nodejs.org left intact
</details>
hm, in that case i'm not sure. nvm ls-remote
makes two network calls, to nodejs.org and iojs.org. If you're only seeing iojs versions, that means it was unable to list https://nodejs.org/dist/index.tab.
Is there any chance you have $NVM_NODEJS_ORG_MIRROR
set to anything?
Weird. I'm using yay
and it shows most recent version as 0.38.0-1. I updated to that version after my initial post but forgot to add that it did not solve anything.
yay -S nvm
warning: nvm-0.38.0-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...
Packages (1) nvm-0.38.0-1
Total Installed Size: 0.13 MiB
Net Upgrade Size: 0.00 MiB
EDIT:
Didn't realize nvm got into the community repo at some point. Need the nvm-git package from AUR to get the latest version. Installing this did not change the problem for me, however. nvm ls-remote
still only returns iojs entries and nvm install node
returns Version 'node' not found
error. I really don't know what's going on. nvm debug
still shows it's using an old 0.33 version. whereis nvm
only returns /usr/share/nvm
So there's something weird about my PATH or something. I deleted $HOME/.nvm
and reinstalled the nvm-git package. No joy. Got nvm not found error. Ran the curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
command from the readme instructions and now I have a working install. So type nvm
returns nvm is a shell function from /home/matt/.nvm/nvm.sh
and which nvm
prints the contents of the shell script, but whereis nvm
returns /usr/share/nvm
. My $PATH does not include /usr/share
which I believe is intentional. Executables should be installed to /usr/bin
with other resources in /usr/share
. Am I missing something about the AUR package?
nvm
is not a normal executable. It doesn't live on your PATH. Instead, it has to be sourced into your environment, typically in one of your shell init files (e.g. .bashrc
). That's true even if you install it from the AUR. If you're going to install nvm via the official install.sh
, you should remove the AUR (or Manjaro community) package.
so to use the AUR package I have to add source /usr/share/nvm/nvm.sh
to my zshrc
file? or do I change the directions in the Readme and set export NVM_DIR
to the usr/share/nvm
path instead of $HOME/.nvm
?
I'd rather use the AUR package to simplify how many different things I have to do to keep my system up to date.
source /usr/share/nvm/init-nvm.sh
That file is a convenience wrapper around the following:
[ -z "$NVM_DIR" ] && export NVM_DIR="$HOME/.nvm"
source /usr/share/nvm/nvm.sh
source /usr/share/nvm/bash_completion
source /usr/share/nvm/install-nvm-exec
Thanks, @tomwadley for your help. I think I must have not gotten it to work just installing the AUR package and then installed manually without uninstalling the AUR package at some point. Now all is good and cleaned up.
@ljharb -- I think whereis
should return a path for the source of a command. Since nvm
is a command sourced by my shell I believe it is working as expected.
Updating nvm
to latest version works for me.
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
and close terminal or run source ~/.zshrc
glin7976, Ojitos369, cristiantoffalo, wangweiguo2013, kid1211, SerhiiY, johnfaldo4, soenxixi, and luizcieslak reacted with thumbs up emoji
ilearnio reacted with thumbs down emoji
halimb, christophechevalier, Ojitos369, defaye, cristiantoffalo, and soenxixi reacted with heart emoji
All reactions
I'm using zsh and byobu and only got listed the iojs.
~/ echo $NVM_NODEJS_ORG_MIRROR
gave me zsh: permission denied: /home/me/
I used the regular terminal with bash and then I could find all the versions. After installing I could select the desired version in zsh.
I recently installed nv as per this article section Install Node Using the Node Version Manager
when I did
nvm list-remote
I got
/usr/bin/which: no node in (/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/sysadmin/.local/bin:/home/sysadmin/bin:/home/sysadmin/.local/bin:/home/sysadmin/bin)
As mentioned by stevensonmt, I did
echo $NVM_NODEJS_ORG_MIRROR
which gave me
http://nodejs.org/dist
I changed the NVM_NODEJS_ORG_MIRROR to https://nodejs.org/dist (http to https)
export NVM_NODEJS_ORG_MIRROR="https://nodejs.org/dist"
and retried the list-remote command and it worked.
Hope this helps someone.
It's weird.
I installed the latest nvm v0.39.1 by following the instruction in README.
And it's OK when I install the latest node v16.16.0 with nvm install --lts
.
This issue just occurs when I'm trying to install [email protected]. nvm
gave errors like node version not found. And after several times retrying, nvm ls-remote
just lists the iojs versions.
When I restart iterm2 after several times, nvm ls-remote
works fine.
I guess this might blame on my network...
got this problem on running in docker by root
USER root
RUN curl -O https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh && \
bash install.sh && \
. ~/.bashrc && \
nvm install v14.18.1
if change to simple user, the problem disappears
Updating nvm
to latest version works for me. curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
and close terminal or run source ~/.zshrc
This fixed it for me, ty.