Hello,
My Discord bot is occasionally throwing the error Cannot find module discord.js
. The error is fixed every time I reinstall discord.js using the console.
This is my package.json file:
{
"name": "<redacted>",
"version": "1.0.0",
"description": "<redacted>",
"main": "main.js",
"dependencies": {
"discord.js": "^11.4.2",
"enmap": "^4.1.3",
"express": "^4.16.3",
"express.js": "^4.16.3",
"winston": "^2.4.1"
},
"scripts": {
"start": "node main.js",
"test": "node tests.js"
},
"repository": {
"type": "git",
"url": "<redacted>"
},
"author": "<redacted>",
"license": "MIT",
"bugs": {
"url": "<redacted>"
},
"homepage": "<redacted>"
}