Cannot find module 'discord.js'


#1

Error code:
https://pastebin.com/69ZYjAPr

Package.json:
https://pastebin.com/cCZVMkfb

Project name:
weibot-bot
weibot-bot.glitch.me

(Project is private)


#2

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 (https://support-assets.glitch.me/logs-pane-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!


#3

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

-Erik