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

Silent failure when 1-n Node.js versions don't have a binary for a given OS+architecture #36

Closed
2 of 3 tasks
ericcornelissen opened this issue Jun 1, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@ericcornelissen
Copy link

Guidelines

  • Please search other issues to make sure this bug has not already been reported.
  • If this is related to a typo or the documentation being unclear, please click on the relevant page's Edit button (pencil icon) and suggest a correction instead.

Describe the bug

The CLI will fail without an error message if at least one of multiple of the specified Node.js version don't have a binary available for the current platform. Example:

$ nve 10.13.0,12,14,16,18,19,20 some-command

  ⬢  Node.js 10.13.0  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  ⬢  Node.js 14.21.3  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

$ echo $?
1

Steps to reproduce

  1. Figure out your platform (OS + architecture)
  2. Find a Node.js release that isn't available on your platform
  3. Try to run nve with that release and at least one other release

Configuration

  • Command: nve 10.13.0,12,14,16,18,19,20 some-command
  • No configuration file

Environment

npx envinfo --system --binaries --browsers --npmPackages nve --npmGlobalPackages nve

  System:
    OS: macOS 13.4
    CPU: (10) arm64 Apple M1 Pro
    Memory: 5.12 GB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.0.0 - ~/.nvm/versions/node/v20.0.0/bin/node
    npm: 9.6.4 - ~/.nvm/versions/node/v20.0.0/bin/npm
  Browsers:
    Chrome: 113.0.5672.126
    Firefox: 113.0.2
    Safari: 16.5
  npmPackages:
    nve: 16.0.0 => 16.0.0 

Pull request (optional)

  • I can submit a pull request.
@ericcornelissen ericcornelissen added the bug Something isn't working label Jun 1, 2023
@ehmicky
Copy link
Owner

ehmicky commented Jun 1, 2023

Hi @ericcornelissen,

Thanks for reporting this.
The problem seems to be that, after one of the downloads fails, the progress bars of the other downloads keep going. Therefore, the progress bar updates of the terminal overwrites the error message.
This should be fixed by adding a signal option to fetch-node-website, so that nve can abort any ongoing download when it catches an exception.

You'll notice this by passing the --no-progress option, which prevents the bug from appearing then.

nve --no-progress 10.13.0,12,14,16,18,19,20 some-command

Thanks for the issue.

@ericcornelissen
Copy link
Author

ericcornelissen commented Jun 4, 2023

The problem seems to be that, after one of the downloads fails, the progress bars of the other downloads keep going. Therefore, the progress bar updates of the terminal overwrites the error message. This should be fixed by adding a signal option to fetch-node-website,

That makes sense

so that nve can abort any ongoing download when it catches an exception.

As a suggestion, I think it would make sense to provide the user with the ability to either "ignore" or "not ignore" any failures due to missing platform binaries. For my use case, I would like nve not to fail, but output a warning instead.

You'll notice this by passing the --no-progress option, which prevents the bug from appearing then.

nve --no-progress 10.13.0,12,14,16,18,19,20 some-command

Verified this and you're correct.

@ehmicky
Copy link
Owner

ehmicky commented Jul 13, 2023

This is now fixed in 16.0.1! 🎉
Thanks for reporting this bug.

@ehmicky ehmicky closed this as completed Jul 13, 2023
@ehmicky
Copy link
Owner

ehmicky commented Jul 13, 2023

@all-contributors Could you please add @ericcornelissen for bug?

@allcontributors
Copy link
Contributor

@ehmicky

I've put up a pull request to add @ericcornelissen! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants