Why can't I import (require) something from discord.js ?

Just look at the screenshot. It says "The file is a CommonJS module and can possibly be converted into an ES module." The problem I'm facing is that it always says that my token is invalid, which can't be since I've reset it.
No description
2 Replies
d.js toolkit
d.js toolkit7mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by OP
LukeZ
LukeZOP7mo ago
seems to be a problem with the .env - It always returns undfined...
Want results from more Discord servers?
Add your server