Comments (14)
I removed node_modules
and ran npm install
targetting Discord.JS v14.12.1 (Also upgraded to Node v16.13.0). The issue still occured when the project was ran, however this may have been caused by NPM caching packages - I didn't think of that at the time but thats likely what it was. I have reverted to v14.11 for now and will wait for further updates.
from discord.js.
Updated to Node v18 as specified in the rest 2.0.0 milestone changelog.
from discord.js.
16.11 is fine too, and shouldn't be too problematic for now.
from discord.js.
Reopened because this affects Discord.JS directly itself when updating from 14.11.* to 14.12.1.
from discord.js.
16.11 is fine too, and shouldn't be too problematic for now.
Ah cheers, I'll downgrade to 16.11. Might wanna update docs if possible, thanks for the quick reply.
from discord.js.
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.
from discord.js.
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?
from discord.js.
The 2.0.0 release says 18+ is required because of the use of global fetch
so a bit confused, is it 16.11+ or 18+?
from discord.js.
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
from discord.js.
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.
from discord.js.
Just downgraded to 16.11 and the issue is still occuring?
from discord.js.
To be clear, the same issue is occurring?
The parsing of this syntax was added in v8 9.4.146
, which Node updated to in 16.11.0
. I also tested this with a minimum reproducible sample in 16.10 and 16.11 to confirm this, and the sample ran fine on 16.11 as expected.
from discord.js.
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.
from discord.js.
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. 👍
from discord.js.
Related Issues (20)
- Slash command builder type incompatibility HOT 4
- Poll not being created on slash command interaction HOT 4
- `ActionRowBuilder<T>` does not enforce the type of the components to be `T` HOT 1
- Include which users answered what on the finished polls on the payload HOT 2
- Cannot use module due to version upgrading HOT 2
- Ban Appeal
- addChoices in RoleSelectMenuBuilder or in addRoleOption (SlashCommandRoleOption) HOT 1
- Redis ReplyError when pulling with xreadgroup on empty subscribed events HOT 2
- Add `reason` to follow announcement channel endpoint
- Have event handler callbacks support both async/sync methods HOT 3
- No definition found for the 'commands' property HOT 1
- Ambiguous event names: LinkTags and Anchors
- Only messages are allowed to create polls HOT 1
- Merged interfaces from package overview 404.
- Inaccurate typings for GuildMember#partial
- `Message#fetchReference()` returns a non-message on certain message types
- @discordjs/voice not working with Bun HOT 1
- fix MessagePayload.js to send voice message
- TypeError in GuildDeleteAction.handle when Destroying Voice Adapter HOT 13
- Bot send embed messages twice or even triple times after being not used for a while HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from discord.js.