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

Nvm fails to install on bitbucket pipelines sometimes #3352

Open
vivere-dally opened this issue May 15, 2024 · 2 comments
Open

Nvm fails to install on bitbucket pipelines sometimes #3352

vivere-dally opened this issue May 15, 2024 · 2 comments

Comments

@vivere-dally
Copy link

vivere-dally commented May 15, 2024

Operating system and version:

see docker image

How did you install nvm?

    export NVM_DIR="$PWD/nvmhome"
    mkdir "${NVM_DIR}"
    curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash

    echo "export NVM_DIR=\"${NVM_DIR}\"" >> ~/.bashrc
    echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm' >> ~/.bashrc

    source ~/.bashrc

    nvm install 20.12.2

In my pipeline the nvm install command is flaky. Any lead to make it more stable? It fails quite often

Downloading and installing node v20.12.2...
Downloading https://nodejs.org/dist/v20.12.2/node-v20.12.2-linux-x64.tar.xz...
#=#=#                                                                         
                                                                           0.7%
                                                                           1.0%
                                                                           1.1%
#                                                                          1.5%
#                                                                          1.8%
#                                                                          2.0%
#                                                                          2.3%
#                                                                          2.7%
##                                                                         2.8%
##                                                                         3.2%
...
#####################################################################     96.6%
#####################################################################     96.8%
#####################################################################     97.0%curl: (92) HTTP/2 stream 1 was not closed cleanly: INTERNAL_ERROR (err 2)
Binary download from https://nodejs.org/dist/v20.12.2/node-v20.12.2-linux-x64.tar.xz failed, trying source.
grep: /opt/atlassian/pipelines/agent/build/nvmhome/.cache/bin/node-v20.12.2-linux-x64/node-v20.12.2-linux-x64.tar.xz: No such file or directory
Provided file to checksum does not exist.
Binary download failed, trying source.
Detected that you have 8 CPU core(s)
Running with 7 threads to speed up the build
Downloading https://nodejs.org/dist/v20.12.2/node-v20.12.2.tar.xz...

Then the install from source fails as well with the same curl error

@hdomos
Copy link

hdomos commented May 15, 2024

Same thing happens for us on bitbucket pipeline:

  % 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 16555  100 16555    0     0   376k      0 --:--:-- --:--:-- --:--:--  384k
=> Downloading nvm from git to '/root/.nvm'
Cloning into '/root/.nvm'...
fatal: unable to access 'https://github.com/nvm-sh/nvm.git/': Failed to connect to [github.com](http://github.com/) port 443 after 129735 ms: Couldn't connect to server
Failed to clone nvm repo. Please report this!```

@ljharb
Copy link
Member

ljharb commented May 15, 2024

If it were just the first problem, I’d say it’s nodejs.org - but if bitbucket is unable to connect to GitHub also, that suggests an issue with bitbucket. Have you filed an issue with them?

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

3 participants