-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Major: discordjs/rest crashing on Node v16.9.1 #9745
Comments
Updated to Node v18 as specified in the rest 2.0.0 milestone changelog. |
16.11 is fine too, and shouldn't be too problematic for now. |
Reopened because this affects Discord.JS directly itself when updating from 14.11.* to 14.12.1. |
Ah cheers, I'll downgrade to 16.11. Might wanna update docs if possible, thanks for the quick reply. |
FYI, the Node 18 requirement was reverted as to avoid a major bump in discord.js, and as crawl said, this feature was added in Node 16.11 which I think is a reasonable enough expectation to update to when updating dependencies. Will work on a solution to either fix the way tsc compiles this or document it. |
In this case, docs should be updated to reflect this, right? |
The 2.0.0 release says 18+ is required because of the use of global |
I'm not too sure but this workaround/polyfill should work for 16.11. So until v15, it should be 16.11+. https://github.com/discordjs/discord.js/blob/main/packages/rest/src/index.ts#L7 |
That breaking change comment was left in because that commit had 4 other breaking changes, the revert of the engine requirement bump happened later and the changelog generator did not pick it up for some reason. Also, the reason it was reverted in the first place is that the bump was not actually necessary since we don't use global fetch in node, only in web / web-like environments. |
Just downgraded to 16.11 and the issue is still occuring? |
To be clear, the same issue is occurring? The parsing of this syntax was added in |
I removed |
I made a fresh package, installed discord.js and created a file that only imported discord.js, it crashed on 16.10 as expected, and ran fine on 16.11 in both cjs and esm. If you are using some type of process manager, make sure it is updating when you update your global version of node, especially if you have multiple versions of node installed at the same time. |
Inactive, issue resolved with Node v16.11+. Docs may need to be updated to include the version bump (assuming they are not already). Thanks for the help. 👍 |
Which package is this bug report for?
rest
Issue description
Require Discord.JS (v14.12.1) in a javascript file then attempt to run that file using Node. This has only started occuring with the upgrade from DJS v14.11.0 to v14.12.
Code sample
Versions
@discordjs/opus - 0.9.0
@discordjs/voice - 0.16.0
discord.js - 14.12.1
Node - 16.9.1
Issue priority
High (immediate attention needed)
Which partials do you have configured?
No Partials
Which gateway intents are you subscribing to?
Guilds, GuildMembers, GuildEmojisAndStickers, GuildMessages, GuildMessageReactions, DirectMessages, DirectMessageReactions, MessageContent
I have tested this issue on a development release
[email protected]
The text was updated successfully, but these errors were encountered: