Glitch cannot find discord.js module

ah okay, would it be possible to see which one if you were shared into it?

I can’t promise, but it would be easier to debug if I could remix the project and try! My Glitch username is benborgers

i have a link pending approval atm, it doesnt contain my token and whatnot so it should be okay?

I got your project to work! I made a remix of your project and edited my remix, not the original you shared with me.

You have a lot of lot of packages installed in package.json that you never use. I removed these packages from package.json (delete the line where the package is referenced).

  • canvas
  • chalk
  • fs (this is a built in module with Node.js, you don’t have to install it)
  • mongodb
  • node-opus
  • opusscript
  • require-all
  • simple-youtube-api
  • ytdl-core

I found which packages you weren’t using by going down the list in package.json and then searching the project (command+shift+F) to see if they were used in the code anywhere.

Then, there were packages that you were trying to use but you hadn’t installed. These included discord.js-commando and scrambo, so I installed those in the Glitch editor by going to package.json and using the Add Package button at the top.

Then, open the console and run:

  • enable-pnpm
  • pnpm install
  • refresh
1 Like

oh, it worked. I didn’t think about the packages that I weren’t using nor did I realise that I had packages missing. Thank you for helping me.

You’re welcome! Glad it works now :smiley:

1 Like