[Fixed] Discord.js not found

I have received this error in the past and it usually resolves itself over a few hours. However, it’s been over a day so I wanted to check to see if there is something in the code I need to fix.

I tried refreshing and modifying the package.json to see if it would fix the error. I also tried reinstalling packages to no luck.

I have another instance of this bot that is almost 1 to 1 with the one with the errors and it is running fine without any issues, so I am thinking there must be something else going on. Upgrading package versions has also not fixed the issue.

The project name is danmemo-bot.

Here is also the main parts of the package.json:

“name”: “dungeon-oratoria”,
“version”: “1.0.0”,
“main”: “index.js”,
“dependencies”: {
“pm2”: “^4.2.3”,
“redis”: “^3.0.2”,
“uws”: “^99.0.0”,
“zlib-sync”: “^0.1.6”,
“server.js”: “^1.0.0”,
“express”: “^4.17.1”,
“discord.js”: “^12.1.1”
“engines”: {
“node”: “10.x”
“devDependencies”: {},
“scripts”: {
“start”: “node index.js”


@Tsuora, does enable-pnpm help?

Wow that fixed it, I thought I tried that command from a different thread. But, I must have used a different command.

Appreciate the help @khalby786. I’ll add this to my notes.