Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm tarball url failure #3213

Open
varnem2 opened this issue Oct 1, 2023 · 2 comments
Open

npm tarball url failure #3213

varnem2 opened this issue Oct 1, 2023 · 2 comments

Comments

@varnem2
Copy link

varnem2 commented Oct 1, 2023

Operating system and version:

Vagrant Box:
generic/ubuntu2204 (virtualbox, 4.3.2)

vagrant@ubuntu2204 ~ % lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.3 LTS
Release:        22.04
Codename:       jammy

Using a generic zsh shell

vagrant@ubuntu2204 ~ % sudo apt install zsh -y && zsh

nvm debug output:

vagrant@ubuntu2204 ~ % nvm debug
nvm --version: v0.39.5
$SHELL: /bin/bash
$SHLVL: 2
whoami: 'vagrant'
${HOME}: /home/vagrant
${NVM_DIR}: '${HOME}/.nvm'
${PATH}: ${NVM_DIR}/versions/node/v20.8.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/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.15.0-84-generic #93-Ubuntu SMP Tue Sep 5 17:16:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux'
checksum binary: 'sha256sum'
OS version: Ubuntu 22.04.3 LTS
awk: /usr/bin/awk, GNU Awk 5.1.0, API: 3.0 (GNU MPFR 4.1.0, GNU MP 6.2.1)
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.16
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 (GNU grep) 3.7
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: v20.8.0
which node: ${NVM_DIR}/versions/node/v20.8.0/bin/node
which iojs: iojs not found
which npm: npm not found
npm config get prefix: nvm:271: command not found: npm
npm root -g: nvm:271: command not found: npm

nvm ls output:

vagrant@ubuntu2204 ~ % nvm ls
->      v20.8.0
iojs -> N/A (default)
unstable -> N/A (default)
node -> stable (-> v20.8.0) (default)
stable -> 20.8 (-> v20.8.0) (default)
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.21.3 (-> N/A)
lts/gallium -> v16.20.2 (-> N/A)
lts/hydrogen -> v18.18.0 (-> N/A)

How did you install nvm?

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

What steps did you perform?

vagrant@ubuntu2204 ~ % nvm install node
Downloading and installing node v20.8.0...
Downloading https://nodejs.org/dist/v20.8.0/node-v20.8.0-linux-x64.tar.xz...
######################################################################################################################################### 100.0%
Computing checksum with sha256sum
Checksums matched!
tar: bin/corepack: Cannot create symlink to ‘../lib/node_modules/corepack/dist/corepack.js’: Protocol error
tar: bin/npx: Cannot create symlink to ‘../lib/node_modules/npm/bin/npx-cli.js’: Protocol error
tar: bin/npm: Cannot create symlink to ‘../lib/node_modules/npm/bin/npm-cli.js’: Protocol error
tar: Exiting with failure status due to previous errors
Now using node v20.8.0
Installing npm...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  3755  100  3755    0     0  10344      0 --:--:-- --:--:-- --:--:-- 61557
failed to get tarball url for npm/0.2.19

vagrant@ubuntu2204 ~ % rm -rf ~/.nvm ~/.npm

vagrant@ubuntu2204 ~ % curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 15916  100 15916    0     0   119k      0 --:--:-- --:--:-- --:--:--  119k
=> Downloading nvm from git to '/home/vagrant/.nvm'
=> Cloning into '/home/vagrant/.nvm'...
remote: Enumerating objects: 360, done.
remote: Counting objects: 100% (360/360), done.
remote: Compressing objects: 100% (306/306), done.
remote: Total 360 (delta 41), reused 162 (delta 28), pack-reused 0
Receiving objects: 100% (360/360), 220.24 KiB | 1.49 MiB/s, done.
Resolving deltas: 100% (41/41), done.
* (HEAD detached at FETCH_HEAD)
  master
=> Compressing and cleaning up git repository

=> nvm source string already in /home/vagrant/.bashrc
=> bash_completion source string already in /home/vagrant/.bashrc
=> Close and reopen your terminal to start using nvm or run the following to use it now:

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion

vagrant@ubuntu2204 ~ % nvm install node
Downloading and installing node v20.8.0...
Downloading https://nodejs.org/dist/v20.8.0/node-v20.8.0-linux-x64.tar.xz...
######################################################################################################################################### 100.0%
Computing checksum with sha256sum
Checksums matched!
tar: bin/corepack: Cannot create symlink to ‘../lib/node_modules/corepack/dist/corepack.js’: Protocol error
tar: bin/npx: Cannot create symlink to ‘../lib/node_modules/npm/bin/npx-cli.js’: Protocol error
tar: bin/npm: Cannot create symlink to ‘../lib/node_modules/npm/bin/npm-cli.js’: Protocol error
tar: Exiting with failure status due to previous errors
Installing npm...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  3755  100  3755    0     0   9610      0 --:--:-- --:--:-- --:--:--  9610
failed to get tarball url for **npm/0.2.19**

What happened?

Looks like it failed to get tarball url for npm/0.2.19 I'm not sure why it would leave me in this state without npm.

What did you expect to happen?

I'd expect nvm to install npm version 20.0.8? I'm not sure where it's even getting 0.2.19 from. Is their another place that I can delete the reference to 0.2.19 from??

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

Short answer is no.

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

vagrant@ubuntu2204 ~ % curl -I --compressed -v https://nodejs.org/dist/
*   Trying 104.20.22.46:443...
* Connected to nodejs.org (104.20.22.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: Feb  3 00:00:00 2023 GMT
*  expire date: Mar  5 23:59:59 2024 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 0x564e8fc6be90)
* 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):
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* TLSv1.2 (IN), TLS header, Supplemental data (23):
< HTTP/2 200
HTTP/2 200
< date: Sun, 01 Oct 2023 20:32:25 GMT
date: Sun, 01 Oct 2023 20:32:25 GMT
< content-type: text/html
content-type: text/html
< cache-control: public, max-age=3600, s-maxage=14400
cache-control: public, max-age=3600, s-maxage=14400
< last-modified: Sun, 01 Oct 2023 17:55:11 GMT
last-modified: Sun, 01 Oct 2023 17:55:11 GMT
< cf-cache-status: HIT
cf-cache-status: HIT
< age: 9143
age: 9143
< vary: Accept-Encoding
vary: Accept-Encoding
< strict-transport-security: max-age=31536000; includeSubDomains; preload
strict-transport-security: max-age=31536000; includeSubDomains; preload
< x-content-type-options: nosniff
x-content-type-options: nosniff
< server: cloudflare
server: cloudflare
< cf-ray: 80f779902ec910e5-ORD
cf-ray: 80f779902ec910e5-ORD
< content-encoding: br
content-encoding: br

<
* Connection #0 to host nodejs.org left intact
vagrant@ubuntu2204 ~ %
@varnem2 varnem2 changed the title npm tarball url npm tarball url failure Oct 2, 2023
@varnem2
Copy link
Author

varnem2 commented Oct 2, 2023

I think this may be related to hashicorp/vagrant#13263 ?

Anyone else seeing similar errors?

@ljharb
Copy link
Member

ljharb commented Oct 4, 2023

@varnem2 the errors are coming from tar; what's which tar print out?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants