internal/modules/cjs/loader.js:584
throw err;
^
Error: Cannot find module ‘discord.js’
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
at Function.Module._load (internal/modules/cjs/loader.js:508:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
Object. (/app/server.js:1:79)
at Module._compile (internal/modules/cjs/loader.js:701:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:712:10)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
at Function.Module._load (internal/modules/cjs/loader.js:531:3)
It appears that it cannot find the module discord.js even tho in the packages.json there is discord.js. I’ve tried re-adding it and it didn’t work. Tried installing it using terminal same results, I’m not sure what else to try to use to fix this problem so I’m asking here if anyone knows a way to fix this.
I’d give you the full text however I’m running into “you can’t mention more than 2 users” restriction, sorry.
It’s in the pastebin package.json and server.js (I removed most of the commands from server.js that aren’t really needed because there is alot since I don’t have a command handler.)