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.
2 Replies
- 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 OPseems to be a problem with the .env - It always returns undfined...