Trying to make a Discord bot and i'm having issues

Getting this error even though i’ve installed discord.js, i’ve looked at other things for it and nothing has helped

Error: Cannot find module ‘discordjs’
Require stack:

  • C:\Users\jayde\Documents\Discord Bot\main.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 Object. (C:\Users\jayde\Documents\Discord Bot\main.js:1:17)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions…js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12) {
    code: ‘MODULE_NOT_FOUND’,
    requireStack: [ ‘C:\Users\jayde\Documents\Discord Bot\main.js’ ]

In your code you accidentally wrote “discordjs”. Change that to “discord.js” and you should be good.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.