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

Updated @discordjs/collection@2.0.0 breaks node16 compatility (EBADENGINE) #10002

Open
crycode-de opened this issue Nov 27, 2023 · 6 comments
Open

Comments

@crycode-de
Copy link

Which package is this bug report for?

discord.js

Issue description

When installing recent version of discord.js on node 16 an unsupported engine warning will be shown as of the the automatically installed package @discordjs/collection@2.0.0 requires node >= 18.

user@host:/tmp/tmp.8sXz0qWtWM$ npm i discord.js
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@discordjs/collection@2.0.0',
npm WARN EBADENGINE   required: { node: '>=18' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@discordjs/collection@2.0.0',
npm WARN EBADENGINE   required: { node: '>=18' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }

As of the package.json from discord.js it should be compatible with node >=16.11.0 so all depended packages of the discord.js packages should not require a higher version.

This issue breaks for example automated pipeline checks here and didn't happen about 3 weeks ago.

Code sample

No response

Versions

  • discord.js 14.14.1
  • Node: 16.20.2

Output of npm ls @discordjs/collection:

└─┬ discord.js@14.14.1
  ├── @discordjs/collection@1.5.3
  ├─┬ @discordjs/rest@2.2.0
  │ └── @discordjs/collection@2.0.0
  └─┬ @discordjs/ws@1.0.2
    └── @discordjs/collection@2.0.0

Issue priority

Low (slightly annoying)

Which partials do you have configured?

Not applicable

Which gateway intents are you subscribing to?

Not applicable

I have tested this issue on a development release

d0aa8d2

@kyranet
Copy link
Member

kyranet commented Nov 27, 2023

That is intended, Node.js v16 is EOL (End-of-Life) and therefore discouraged from further use, you should start migrating to Node.js v18 or v20 as soon as possible. https://nodejs.org/en/about/previous-releases

@crycode-de
Copy link
Author

I know that node 16 is EOL but such a breaking change should not be done in a minor or patch release as it would break any existing installation. Some users don't want to or can't update node at the moment.

If node 18 is required for discord.js (as it is currently by it's dependencies) this should be a major version increase for discord.js.

In the current situation you are saying "Node.js 16.11.0 or newer is required." but require node 18 by @discordjs/collection dependeny. This makes no sense.

@vladfrangu
Copy link
Member

vladfrangu commented Nov 27, 2023

Discord.js imports @discordjs/collection@1.x, whereas we've released v2.0 with this requirement. Can you run npm ls @discordjs/collection to see where its coming from?

EDIT: I see where its coming from, which is the internal packages. Realistically, the warning doesn't stop anything and it'll still work.

@crycode-de
Copy link
Author

@vladfrangu It's coming from @discordjs/rest and @discordjs/ws as already shown in my first post.

@didinele
Copy link
Member

Yeah it's unfortunate but it functionally doesn't matter. I doubt there's really anything we could implement to collection to actually cause this to break.

@insaneMe31
Copy link

zlib-sync

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

5 participants