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

Big green download button on nodejs.org from Linux/x64 gives source archive #5610

Closed
sxa opened this issue Aug 8, 2023 · 5 comments · Fixed by #5618
Closed

Big green download button on nodejs.org from Linux/x64 gives source archive #5610

sxa opened this issue Aug 8, 2023 · 5 comments · Fixed by #5618
Labels
bug good first issue Issues for newcomers

Comments

@sxa
Copy link
Member

sxa commented Aug 8, 2023

URL:

https://nodejs.org

Browser Name:

Firefox

Browser Version:

101.0

Operating System:

Fedora Silverblue 37

How to reproduce the issue:

Go to nodejs.org and try to click the download button for 18 or 20. The URLs point to the source archive e.g. https://nodejs.org/dist/v18.17.0/node-v18.17.0.tar.gz at present, instead of the node-v18.17.0-linux-x64.tar.xz build that I would expect. From the screnshot you can see that it has correctly detected what platform I'm using.

image

@sxa sxa added the bug label Aug 8, 2023
@ovflowd
Copy link
Member

ovflowd commented Aug 8, 2023

I can confirm this is a regression, the current https://github.com/nodejs/nodejs.org/blob/main/util/downloadUrlByOS.ts provides .tar.gz instead of .tar.xz

@sxa feel free to update this file. This should fix your issue afaik. (Opening a PR also deploys a preview where you can check this indeed fixes the issue)

@ovflowd ovflowd added the good first issue Issues for newcomers label Aug 9, 2023
@sxa
Copy link
Member Author

sxa commented Aug 9, 2023

I'll give it a try - thanks for the pointer to where it might be. Since we generally have both tar.gz and tar.xz in the download site I'd have though the current code would have still been able to point ot the gz version.

@ovflowd
Copy link
Member

ovflowd commented Aug 9, 2023

I'll give it a try - thanks for the pointer to where it might be. Since we generally have both tar.gz and tar.xz in the download site I'd have though the current code would have still been able to point ot the gz version.

Yup on the "All Downloads" page you can still download the .gz even if you do this change. This file is pretty much used for the automatic OS detection on the Home page.

@sxa
Copy link
Member Author

sxa commented Aug 9, 2023

It looks like there isn't an easy way to have the architecture detection in that piece of code, so it may require more work to do anything other than hard code for x64 as a 'quick fix'.

It looks like the label on the web page puts 'Linux (x64)' for all Linux variants based on

return ` Linux (x64)`;

I'll initially hard code it to linux/x64 and see if that works before we look at whether we can enhance it - even if that's in place as a first phase it'l lbe better than what we have at present ';-)

@ovflowd
Copy link
Member

ovflowd commented Aug 9, 2023

I'll initially hard code it to linux/x64 and see if that works before we look at whether we can enhance it - even if that's in place as a first phase it'l lbe better than what we have at present ';-)

That's fine for now. The whole Website and its components and content will be changing soon, so this part will be overhauled very soon. The hot-fix for now at least solves the Linux x64 issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug good first issue Issues for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants