ipfs / js-ipfs

IPFS implementation in JavaScript
https://js.ipfs.tech
Other
7.44k stars 1.25k forks source link

Libraries fail to support LTS versions of Node.js #4135

Closed gnidan closed 2 years ago

gnidan commented 2 years ago

Severity:

High (The main functionality of the application does not work, API breakage, repo format breakage, etc.)

Description:

Right now, the ipfs package requires Node v15, even though Node v14 is LTS until April 2023. Pretty much every time I look at this, the situation is the same - Node v12 was dropped before LTS ended, etc. Again, for years now.

This is problematic because IPFS is an enormously consequential public good, and Node.js-based projects that wish to embed these packages cannot do so while offering a sensible support lifecycle to their users.

Please, this is not a "minor inconvenience", as has been stated in other issues. I'm coming to this from trufflesuite/truffle, where we got so fed up trying to offer our users access to IPFS and Filecoin that we had to remove it from our repo and package dependencies list entirely... and not for lack of trying.

Steps to reproduce the error:

Use LTS Node.js. Install ipfs. Observe error.

welcome[bot] commented 2 years ago

Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review. In the meantime, please double-check that you have provided all the necessary information to make this process easy! Any information that can help save additional round trips is useful! We currently aim to give initial feedback within two business days. If this does not happen, feel free to leave a comment. Please keep an eye on how this issue will be labeled, as labels give an overview of priorities, assignments and additional actions requested by the maintainers:

Finally, remember to use https://discuss.ipfs.io if you just need general support.

achingbrain commented 2 years ago

The js-ipfs ecosystem projects support Node LTS Current and Node LTS Active. They do not support Node LTS Maintenance.

Long-term the idea is to not rely on features from node core as much as possible, writing only cross-platform js that runs anywhere (hello Deno, etc).

Unfortunately node is only just starting to embrace certain language features, so when we start to use them we become more compatible with non-node JS environments but unfortunately we also cut off older node versions.

We do wait for these versions to become part of Maintenance LTS, but there just aren't enough regular contributors to these projects to backport features to older versions of node or ensure compatibility outside of CI.

So as a downstream consumer of the project you have two choices:

  1. Stick with the version that works with your supported platform
  2. Upstream PRs that restore compatibility with your supported platform - I will gladly merge them

You appear to have made a third choice which is to opt-out of the ecosystem altogether, which is a great shame. I'm sorry you ran into problems - did you open issues for the problems you were seeing or PR any fixes?

github-actions[bot] commented 2 years ago

Oops, seems like we needed more information for this issue, please comment with more details or this issue will be closed in 7 days.

github-actions[bot] commented 2 years ago

This issue was closed because it is missing author input.