nodejs.org icon indicating copy to clipboard operation
nodejs.org copied to clipboard

Install Node.js LTS version on windows by chocolate failed for the wrong Package

Open saintak opened this issue 1 year ago • 5 comments

URL:

https://nodejs.org/en/download/package-manager

Browser Name:

Microsoft Edge

Browser Version:

123.0.2420.81

Operating System:

Windows 11 23H2 22631.3296

How to reproduce the issue:

  1. I want to install Install Node.js LTS version on windows by chocolate, as the https://nodejs.org/en/download/package-manager show below QQ截图20240410154222

  2. But it failed like below QQ截图20240410154237

  3. And I find that there is no 20.12.1 in Package nodejs. https://community.chocolatey.org/packages/nodejs#versionhistory

  4. But I should install 20.12.1 LTS by the Package https://community.chocolatey.org/packages/nodejs-lts#versionhistory

  5. so I think the file nodejs/nodejs.org/util/getNodeDownloadSnippet.ts should be modified to change the command to choco install nodejs-lts --version="${release.version}" when we check the LTS version

saintak avatar Apr 10 '24 07:04 saintak

Oh that is really interesting! Does Chocolatey publish two different packages for LTS and Non-LTS version? O.o

In my previous findings this was not the case, could it be that it just did not get published yet on the regular nodejs package?

ovflowd avatar Apr 10 '24 08:04 ovflowd

Oh that is really interesting! Does Chocolatey publish two different packages for LTS and Non-LTS version? O.o

In my previous findings this was not the case, could it be that it just did not get published yet on the regular nodejs package?

@ovflowd you will find that in the link https://community.chocolatey.org/packages/nodejs#versionhistory , so it is still recommended to use the nodejs-lts package if only targeting the latest LTS release is required. And there is no LTS version added since 20.12.0. The last LTS version in nodejs package is 20.11.1 which was added in February 15, 2024, while the last current version is Node JS 21.7.1 which was added in April 4, 2024

QQ截图20240410190350 QQ截图20240410190403

So I think it's time to switch to the new package nodejs-lts for LTS version

saintak avatar Apr 10 '24 11:04 saintak

Oh that is really interesting! Does Chocolatey publish two different packages for LTS and Non-LTS version? O.o

In my previous findings this was not the case, could it be that it just did not get published yet on the regular nodejs package?

@ovflowd you will find that in the link https://community.chocolatey.org/packages/nodejs#versionhistory , so it is still recommended to use the nodejs-lts package if only targeting the latest LTS release is required.

And there is no LTS version added since 20.12.0.

The last LTS version in nodejs package is 20.11.1 which was added in February 15, 2024, while the last current version is Node JS 21.7.1 which was added in April 4, 2024

  • While this package now provides both Current and LTS releases of Node.js, it is still recommended to use the nodejs-lts package if only targeting the latest LTS release is required.

QQ截图20240410190350

QQ截图20240410190403

So I think it's time to switch to the new package nodejs-lts for LTS version

Are you saying the regular nodejs package also doesn't contain the latest non-lts versions? 🤔

ovflowd avatar Apr 10 '24 11:04 ovflowd

Hmm, nevermind, they have the latest version (just not the latest one released a few days ago)... Since this package seems community-maintained, we depend on them updating those versions manually...

ovflowd avatar Apr 10 '24 11:04 ovflowd

Hmm, nevermind, they have the latest version (just not the latest one released a few days ago)... Since this package seems community-maintained, we depend on them updating those versions manually...

Yes, but the nodejs-lts has been updated to the latest version. I think it's possible to indicate on the download page that chocolate may not download the latest version of node.js in a timely manner. I suggest that users can go to this link to view the latest version they provide

saintak avatar Apr 10 '24 11:04 saintak