CesiumLabs / quick.eco

Powerful economy framework for discord bots.
https://eco.js.org
55 stars 9 forks source link

"TypeError: db.table is not a constructor" error thrown when attempting to start bot. #20

Closed Compositr closed 4 years ago

Compositr commented 4 years ago

A quick summary of the problem: So I have followed the guide on setting the bot up, but when I attempt to run it with node main.js I get this error: image

It reads:

TypeError: db.table is not a constructor
    at new EconomyManager (C:\Users\sammy\Desktop\KRPSBot\2.0.5\node_modules\quick.eco\src\EconomyManager.js:18:24)
    at Object.<anonymous> (C:\Users\sammy\Desktop\KRPSBot\2.0.5\commands\balance.js:3:13)
    at Module._compile (internal/modules/cjs/loader.js:1133:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1153:10)
    at Module.load (internal/modules/cjs/loader.js:977:32)
    at Function.Module._load (internal/modules/cjs/loader.js:877:14)
    at Module.require (internal/modules/cjs/loader.js:1019:19)
    at require (internal/modules/cjs/helpers.js:77:18)
    at Object.<anonymous> (C:\Users\sammy\Desktop\KRPSBot\2.0.5\main.js:15:18)
    at Module._compile (internal/modules/cjs/loader.js:1133:30)

Expected outcome: That this wouldn't happen and the program would continue as normal.

Extra comments: I think the issue resides in the EconomyManager.js (line 18) where it says if (name) db = new db.table(name.replace(/ +/g, ""));

twlite commented 4 years ago

Hello @CoolJim, I'm sorry but quick.eco is deprecated & no longer maintained.