module.js:550
8:35 PM
throw err;
8:35 PM
^
8:35 PM
8:35 PM
Error: Cannot find module ‘discord.js’
No time to do anything just copy pasting things
module.js:550
8:35 PM
throw err;
8:35 PM
^
8:35 PM
8:35 PM
Error: Cannot find module ‘discord.js’
No time to do anything just copy pasting things
Go to your package.json file
Click “add package”
Type in discord.js
Click the top result
And it shouldn’t error anymore
Hello there,
You need to install a package before requiring/using it.
There are a few methods to install packages on Glitch:
"dependencies": {
"package-name-here": "version"
}
npm install package-name
to install the package. Restart your app and it should be installed.Hope this helps and happy glitching!
there is still
I have tried most of things
Still now good check it out
edit: That aint the correct name
Could you enter your console and run pnpm install
? It should re-install all the packages
It would be much easier if you could DM me an invite to your app/project, so I can take a closer look into it. Furthermore, @SpeedyCraftah, I am not sure why did you presume that he has pm2 integrated.
-su: pm2: command not found
this is the error no idea what i should do
Please refrain from misguiding users!
I know that everyone should be able to comment on topics, but that can confuse users.
dmed you did you got it?
Oh I meant to say pnpm install
haha
Since the error was resolved, changed the title to [SOLVED] Module.js:550 throw err; ^ Error: Cannot find module 'discord.js'
The instructions are given in the footer of the error message.