Discord.js error missing module error

Hello, yesterday I saw that my bot discord went offline so I went to take a look at what happened. and ended up giving this error: " internal / modules / cjs / loader.js: 613 throw err; ^ Error: Cannot find module 'discord.js "I already tried to use the command enable-pnpm. On the terminal only, it still gives the same error, could you help me? even with the already installed discord. (i’m using google translator so sorry for any spelling mistakes)

Could you try npm i discord.js in the console?

I also tried this but still with the error :frowning:

the only way to solve it was to migrate to another project here on the glitch. even doing everything I saw here on the support, I couldn’t do it, so I did another project.

Usually when it says “cannot find module” it’s because the module is not installed. Next time, try uninstalling and reinstalling the discord.js package in your package.json file since you said it’s already installed

I also did it and I still have the error, I think it was an error in my project and not in the installed discord or not.

rm -rf node_modules/
rm -rf shrinkwrap.yaml
enable-pnpm