Reputation: 49
When I start my discord bot I get an error on the console:
internal/modules/cjs/loader.js:834
throw err;
^
Error: Cannot find module 'discord.js'
Require stack:
- /home/container/index.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:831:15)
at Function.Module._load (internal/modules/cjs/loader.js:687:27)
at Module.require (internal/modules/cjs/loader.js:903:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/home/container/index.js:1:17)
at Module._compile (internal/modules/cjs/loader.js:1015:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1035:10)
at Module.load (internal/modules/cjs/loader.js:879:32)
at Function.Module._load (internal/modules/cjs/loader.js:724:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [ '/home/container/index.js' ]
}
But if there is an "index.js"
Upvotes: 0
Views: 11307
Reputation: 957
You need to install discord.js, in your console type npm install discord.js
Upvotes: 1