RIP Discord.JS - Solved by @etamponi

Hi there, I’ve been using for a while but since today my bot has been died.

It give me random errors such as “discord.js cant be found” while it was yesterday going up and running.
This is the official error:

    throw err;

Error: Cannot find module 'discord.js'
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
at Object.<anonymous> (/app/server.js:1:79)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)

This is my package.json file

  "main": "node server.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "start": "node server.js"
  "engines": {
    "node": "8.x"
  "author": "TimoTF5",
  "license": "MIT",
  "dependencies": {
    "discord.js": "^11.3.2",
    "fs": "^0.0.2",
    "ms": "^2.1.1",
    "node-gyp": "^3.7.0",
    "quick.db": "^6.3.2",
    "weather-js": "^2.0.0",
    "weather.js": "^0.1.0",
    "translate": "^1.0.2"

If there is an fix it would be helpfull for me and some other friends who has the same problems

from the info.txt what @etamponi

Hello, this is what happened:

For some reason, your package.json file was out of sync with respect to what was written on the filesystem.

This meant that discord.js was not "really" in your dependencies.

We can't know for sure why this situation occurred. The most likely scenario is that you ran npm install from the Console, and then forgot to run "refresh" to update the editor state. Currently, the editor does not pick up changes that you make from the Console.

Perhaps you have more data on what's the most likely reason for this issue. In case, let us know :)

Feel free to report that your bot is now working on the forums, and reach out again if another issue happen :)

Do you have questions now? Write them here, I'll be around for a few more minutes.

Timo Nismo: I have no further questions. Thanks for helping 🎉

Ok then :) Happy coding! - Emanuele

Really thanks again to @etamponi he helped me a lot so my bot is again on. :smiley:

Kind Regards, Timo Nismo

Hi :slight_smile:

your package.json doesn’t seem to have a problem. Can you tell us the project name, so we can take a look?

1 Like

Link Deleted