The required Node.js version for discord.js is v16.6. Without it you could get errors such as
- AbortController is not defined
- Unexpected token ‘?’
- Cannot find module ‘node:events’
Simply just upgrade to v16.6 and these errors will be fixed.
More Related Contents:
- What is the difference between setActivity and setPresence?
- Discord bot simple editing its own message gives me error
- SyntaxError: Unexpected token ‘{‘ Discord.js
- How do I fix CLIENT_MISSING_INTENTS error?
- What is the difference between a User and a GuildMember in discord.js?
- Why am I getting a ReferenceError: AbortController is not defined in Discord.js v13?
- Discord bot on Heroku throws an error: agent ??= new https.Agent
- Send a message with Discord.js
- My discord bot code is working but is not responding to my commands [duplicate]
- Sending private messages to user
- Find out if someone has a role
- Discord API valid intents must be provided for the client [duplicate]
- Error [ERR_REQUIRE_ESM]: require() of ES Module not supported [duplicate]
- message.content doesn’t have any value in Discord.js v14
- message.content doesn’t have any value in Discord.js
- Discord.js v13 code breaks when upgrading to v14
- setPresence activity type in discord.js v14 can only be set to “PLAYING”
- Discord.js – Cooldown for a command for each user not all users
- Checking if a message was sent from a DM not working
- Checking if a message was sent from a DM channel type not working
- Discord.js: Invalid bitfield flag or number: GUILDS
- Fetch more than 100 messages
- MongooseError: Model.findOne() no longer accepts a callback at Function
- How to access POST form fields in Express
- Sending command line arguments to npm script
- Are all javascript callbacks asynchronous? If not, how do I know which are?
- Is there any way to get Firebase Auth User UID?
- Node.js / Express.js – How to override/intercept res.render function?
- How can I extract the preceding audio (from microphone) as a buffer when silence is detected (JS)?
- Node JS fs module inside browser