Cannot find module 'discord.js'


Error code:


Project name:

(Project is private)


Hi @Erik1206, welcome to the Glitch Forums!

Thanks for all the information; it really helps us help you to get the appropriate info up front.

In this case the error you’re seeing means that the package in question isn’t installed, but when it comes to ( p )npm installation problems, the reported error from the code doesn’t mean that that’s the package that’s actually having the installation problem - it’s just the first one that your code can’t find.

You can get some more information about what’s going wrong by opening your project’s console ( shows you how) and running pnpm install manually until you’ve resolved whatever errors are showing up. In your specific case it looks like you’re expecting non-existent versions of the sqlite3 and ytdl-core packages.

Hope this helps. Happy Glitching!


Thank for your fast reply and for your help. Everything is working now.