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

Notice to upgrade pnpm should have a warning if new node version is required #7980

Open
1 task done
mika76 opened this issue Apr 21, 2024 · 5 comments
Open
1 task done

Comments

@mika76
Copy link

mika76 commented Apr 21, 2024

Verify latest release

  • I verified that the issue exists in the latest pnpm release

pnpm version

v8 v9

Which area(s) of pnpm are affected? (leave empty if unsure)

CLI

Link to the code that reproduces this issue or a replay of the bug

No response

Reproduction steps

have pnpm 8.15.6 and node 17

pnpm add -g pnpm

now you can't run pnpm any more because it requires new node version.

Describe the Bug

I got the following message...

   ╭─────────────────────────────────────────────────────────────────╮
   │                                                                 │
   │                Update available! 8.15.6 → 9.0.4.                │
   │   Changelog: https://github.com/pnpm/pnpm/releases/tag/v9.0.4   │
   │                Run "pnpm add -g pnpm" to update.                │
   │                                                                 │
   │     Follow @pnpmjs for updates: https://twitter.com/pnpmjs      │
   │                                                                 │
   ╰─────────────────────────────────────────────────────────────────╯```

and of course I ran the command, only to find that now I can't run pnpm at all because it required a new node version (I was on 17)

I think there should be a warning if a new node version is required. Why is node 18 even required for an update of pnpm?

### Expected Behavior

Either a warning, or don't require new node version.

### Which Node.js version are you using?

17.9.1

### Which operating systems have you used?

- [X] macOS
- [ ] Windows
- [ ] Linux

### If your OS is a Linux based, which one it is? (Include the version if relevant)

_No response_
@mika76
Copy link
Author

mika76 commented Apr 21, 2024

Node.js v16 support dropped. Use at least Node.js v18.12.

Lockfile version bumped to v7.

Support for lockfile v5 is dropped. Use pnpm v8 to convert lockfile v5 to lockfile v6

What is it with you guys just dropping support for things and skipping node versions? Why? You do realise this affects people right? Not just development environments but build agents as well.

I'm pretty sure backwards compatibility can be managed better? At least put a note in the release notes on why support for a version is dropped...

(PS I don't mean for this comment/issue to come off as overly critical - I love what you guys do and appreciate it - but a simple upgrade should not break everything)

@zkochan
Copy link
Member

zkochan commented Apr 21, 2024

Node.js 17 is not an LTS version, when Node.js 18 came out it stopped receiving updates, so don't expect long term support for non-lts versions.

It does affect people, hence it is done in a breaking upgrade.

You can use the standalone version of pnpm that is bundled to an executable. In that case you don't care about which node.js version is on the system. Instruction are here: https://pnpm.io/installation#using-a-standalone-script

@weyert
Copy link
Contributor

weyert commented Apr 22, 2024

Maybe we want to clarify the change log so it says
Node.js v16 and v17 support dropped?

@mcmxcdev
Copy link
Contributor

What is it with you guys just dropping support for things and skipping node versions? Why? You do realise this affects people right? Not just development environments but build agents as well.

I'm pretty sure backwards compatibility can be managed better? At least put a note in the release notes on why support for a version is dropped...

@mika76 pnpm is actually very strict about following semver requirements. Node versions get dropped only for major version updates of pnpm (same like it is a common practice for other popular projects). The whole point of major version releases is to raise awareness to the fact that there can be changes which are not backwards compatible. If you blindly upgrade your dependencies to a new major version, you should be clear about the implications of that.

You can see the current release schedule on e.g. https://nodejs.org/en/about/previous-releases, which will tell you that Node v18 and lower are already in maintenance mode, and Node v20 is the active LTS version. "Use at least Node.js v18.12." in a changelog should make it pretty clear for you what is supported still ;)

@mika76
Copy link
Author

mika76 commented Apr 26, 2024

My question is why stop supporting them? Just because node doesn't support their old version doesn't mean pnpm would stop working on them, they have been battle tested and would still work without issue.

Or rather my question is not why stop "supporting" but why hard-lock us from running with them. Support could be stopped officially but pnpm will not run at all if using those node versions, which is strange to me. Why not put in a hard lock once a bug is actually found which is affected by that node version. You don't see app's putting in a hard lock on working on Windows 8 because it's "out of support" by Microsoft.

And if there is an actual reason to stop it from running on them, then make it clear somewhere why.

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

No branches or pull requests

4 participants