nvm: NVM install hangs indefinitely

Operating system and version:

Linux, PopOS 22.04

nvm debug output:

nvm --version: v0.39.1
$SHELL: /bin/bash
$SHLVL: 1
whoami: 'jackkendall'
${HOME}: /home/jackkendall
${NVM_DIR}: '${HOME}/.nvm'
${PATH}: ${HOME}/.cabal/bin:${HOME}/.ghcup/bin:${HOME}/.cargo/bin:${HOME}/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:${HOME}/.dotnet/tools:${HOME}/.fzf/bin
$PREFIX: ''
${NPM_CONFIG_PREFIX}: ''
$NVM_NODEJS_ORG_MIRROR: ''
$NVM_IOJS_ORG_MIRROR: ''
shell version: 'GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu)'
uname -a: 'Linux 5.17.5-76051705-generic #202204271406~1651504840~22.04~63e51bd SMP PREEMPT Mon May 2 15: x86_64 x86_64 x86_64 GNU/Linux'
checksum binary: 'sha256sum'
OS version: Pop!_OS 22.04 LTS  
curl: /usr/bin/curl, curl 7.81.0 (x86_64-pc-linux-gnu) libcurl/7.81.0 OpenSSL/3.0.2 zlib/1.2.11 brotli/1.0.9 zstd/1.4.8 libidn2/2.3.2 libpsl/0.21.0 (+libidn2/2.3.2) libssh/0.9.6/openssl/zlib nghttp2/1.43.0 librtmp/2.3 OpenLDAP/2.5.11
wget: /usr/bin/wget, GNU Wget 1.21.2 built on linux-gnu.
git: /usr/bin/git, git version 2.34.1
grep: /usr/bin/grep (grep --color=auto), grep (GNU grep) 3.7
awk: /usr/bin/awk, GNU Awk 5.1.0, API: 3.0 (GNU MPFR 4.1.0, GNU MP 6.2.1)
sed: /usr/bin/sed, sed (GNU sed) 4.8
cut: /usr/bin/cut, cut (GNU coreutils) 8.32
basename: /usr/bin/basename, basename (GNU coreutils) 8.32
rm: /usr/bin/rm, rm (GNU coreutils) 8.32
mkdir: /usr/bin/mkdir, mkdir (GNU coreutils) 8.32
xargs: /usr/bin/xargs, xargs (GNU findutils) 4.8.0
nvm current: none
which node: 
which iojs: 
which npm: 
npm config get prefix: Command 'npm' not found, but can be installed with:
sudo apt install npm
npm root -g: Command 'npm' not found, but can be installed with:
sudo apt install npm

nvm ls output:

            N/A
iojs -> N/A (default)
node -> stable (-> N/A) (default)
unstable -> N/A (default)
lts/* -> lts/gallium (-> 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.24.1 (-> N/A)
lts/erbium -> v12.22.12 (-> N/A)
lts/fermium -> v14.19.3 (-> N/A)
lts/gallium -> v16.15.1 (-> N/A)

How did you install nvm?

I ran the curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash command from the README.

What steps did you perform?

I ran nvm install node, nvm install --lts, nvm install 16.15.01, etc.

What happened?

NVM printed out a line like this: Downloading and installing node v16.15.1...

And then hung indefinitely. I left the process running for around half an hour on each example and didn’t see any more output.

What did you expect to happen?

The installation to happen fairly quickly, or some kind of progress bar if downloading/installing is taking a long time.

Is there anything in any of your profile files that modifies the PATH?

I have the terminal filemanager NNN set to cd on quit. I don’t know if that modifies PATH.

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

*   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
*  CAfile: /etc/ssl/certs/ca-certificates.crt
*  CApath: /etc/ssl/certs
* TLSv1.0 (OUT), TLS header, Certificate Status (22):
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS header, Certificate Status (22):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS header, Finished (20):
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* 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.2 (OUT), TLS header, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
* 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: CN=*.nodejs.org
*  start date: Jan 11 00:00:00 2022 GMT
*  expire date: Feb 11 23:59:59 2023 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
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
* Using Stream ID: 1 (easy handle 0x56243e380b50)
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
> HEAD /dist/ HTTP/2
> Host: nodejs.org
> user-agent: curl/7.81.0
> accept: */*
> accept-encoding: deflate, gzip, br, zstd
> 
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* old SSL session ID is stale, removing
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* Connection state changed (MAX_CONCURRENT_STREAMS == 256)!
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
* TLSv1.2 (IN), TLS header, Supplemental data (23):
< HTTP/2 200 
HTTP/2 200 
< date: Thu, 02 Jun 2022 07:01:17 GMT
date: Thu, 02 Jun 2022 07:01:17 GMT
< content-type: text/html
content-type: text/html
< last-modified: Thu, 02 Jun 2022 06:35:09 GMT
last-modified: Thu, 02 Jun 2022 06:35:09 GMT
< cache-control: max-age=14400
cache-control: max-age=14400
< cf-cache-status: HIT
cf-cache-status: HIT
< 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: 714e51210e68b2e7-MAN
cf-ray: 714e51210e68b2e7-MAN
< content-encoding: br
content-encoding: br

< 
* Connection #0 to host nodejs.org left intact

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 16 (6 by maintainers)

Commits related to this issue

Most upvoted comments

I have been using some aliases (ls and 😃 for years and this is the first time I faced an issue. This post saved some precious hours.

Yep – that’s worked and completed right away. Guess that’s what I get for thinking I was clever with aliases! Thank you very much @ljharb, I never would have figured that out by myself.

ok, then that suggests it’s not the downloading part that’s being slow, but it’s strange that there’s no progress bar being shown.

(I’m not familiar with PopOS, but I assume it has to compile node instead of using a prebuilt binary, so it’s also possible that’s the issue)

Can you try nvm_download_artifact node binary std v18.3.0 and see what it prints out?

I’m having the same issue. I thought it was my network problem, but seeing this post makes me feel a little bit better.