5310 / discord-bot-castform

A Discord bot that forecasts weather for Pokémon GO
26 stars 10 forks source link

Database error on startup #17

Open t00fan opened 3 years ago

t00fan commented 3 years ago

Thank you for the bot. It has been working good for me. I recently ran out of disk space while the bot was running, and after fixing that I keep getting the following error:

Keepalive server is running
Castform is running
(node:704160) UnhandledPromiseRejectionWarning: DatabaseError: Can't Load Database
    at JsonDB.load (/home/discord-bot-castform/node_modules/node-json-db/dist/JsonDB.js:295:27)
    at JsonDB.retrieveData (/home/discord-bot-castform/node_modules/node-json-db/dist/JsonDB.js:52:14)
    at JsonDB.getData (/home/discord-bot-castform/node_modules/node-json-db/dist/JsonDB.js:125:21)
    at /home/discord-bot-castform/index.js:46:41
    at exports.run (/home/discord-bot-castform/utils.js:1:20)
    at Object.<anonymous> (/home/discord-bot-castform/index.js:42:1)
    at Module._compile (internal/modules/cjs/loader.js:1076:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
    at Module.load (internal/modules/cjs/loader.js:941:32)
    at Function.Module._load (internal/modules/cjs/loader.js:782:14)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:704160) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)

I have even re cloned the project, but keep getting the same error. Any help would be appreciated.

5310 commented 3 years ago

It seems to me that your config.json is either missing or broken. Please check that it's proper.