MODULE_NOT_FOUND
Hello!
I encountered a problem when trying to run my Discord.js bot. I don't know why I keep getting this error even though I upgraded the version of Discord.js (14.11.0 -> latest version). I also tried "clean install" by removing the node_modules dir and reinstalling all the dependencies. What should I do to fix this error?
Here's the error message:
PS I removed the actual path of my workspace for security purposes
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!okay, i'll try
here's the output:
Well, I simply run the
npm i
or npm install
to reinstall all dependencies. Did I do something wrong?
So, after I remove the node_modules
dir, I just simply run npm i
.
Is this wrong?
I think I fixed it. I don't know if it's true or not, but when I remove the node_modules
dir and the package-lock.json
file, and I try to reinstall all dependencies by running the npm i
command, and I don't know how, but suddenly the bot can run. 🤷