Error: Cannot find module 'discord.js'

It’s discord.js, not discordjs. You are defining the package name wrong.


@SplitXPlayZ can you not repeat what @anon43649539 said. You have been reapeating others a lot! Remember there isn’t any race!



:joy: dude we all know it isn’t an AI. If it was an AI it wouldn’t take 2 days to respond. Stop taking @ihack2712’s idea of building a glitch automation system and repeating it in your own way. (Also automation is against ToS so are you breaking the ToS or faking the AI?)


It is against Glitch ToS to run an automated bot on the support forum.


If you were an AI what about posts like these where you clearly are a human and there isn’t any “Administrator Made Post” written anywhere.

1 Like

What is even happening, @SplitXPlayZ I request you to stop this nonsense.


I’m pretty sure the Terms of Service of Glitch also applies to the support forum and here’s what it says, according to Conduct Restrictions:

  1. falsely impersonate any person or entity, including any of our employees or representatives, misrepresent your identity or the site’s purpose, or falsely associate yourself with Glitch, Inc.;

Also, suffixing your posts with ‘Administrator Made Post’ can be quite misleading for new or unfamiliar users.

We are all going off-topic for this thread, I suggest we stop this discussion right now.


You have to change the "main" value. Change the value to "server.js", not "node server.js".

Also upgrade discord.js as v11 wont work soon due to discord changing their domain.

1 Like

Please don’t bump posts or post the same message twice! People will more than likely respond to the first one.

2020 and this help me, thank you

Hello everyone ! I started making discord bot and everything was fine until this error pops out!
throw err;

Error: Cannot find module ‘./commands/${f}’
Require stack:

  • C:\Users\unres\OneDrive\Desktop\Discord Bot\index.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
    at Function.Module._load (internal/modules/cjs/loader.js:725:27)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at C:\Users\unres\OneDrive\Desktop\Discord Bot\index.js:18:25
    at Array.forEach ()
    at C:\Users\unres\OneDrive\Desktop\Discord Bot\index.js:17:16
    at FSReqCallback.oncomplete (fs.js:171:23) {
    code: ‘MODULE_NOT_FOUND’,
    requireStack: [ ‘C:\Users\unres\OneDrive\Desktop\Discord Bot\index.js’ ]

I can’t show u pictures of my code or something cuz im new here but if u have any solution for thath it would be great to share it with me !

  1. Please don’t bump old threads, instead, make a new one please. You can look at this picture of help

  2. You are gonna have to give us the name of the project. We need to see your code so we can help your project.