Sank6 / Discord-Bot-List

Just another botlist for discord
GNU General Public License v3.0
212 stars 184 forks source link

error when starting up #47

Closed mandar1jn closed 4 years ago

mandar1jn commented 4 years ago

When I start everything I get this error: discordbotlist@3.0.0 start C:\Users\Marijn\Desktop\Discord-Bot-Listing

node src/index.js

C:\Users\Marijn\Desktop\Discord-Bot-Listing\node_modules\klasa\src\lib\extensions\KlasaUserStore.js:7 class KlasaUserStore extends UserStore { ^

TypeError: Class extends value undefined is not a constructor or null at Object. (C:\Users\Marijn\Desktop\Discord-Bot-Listing\node_modules\klasa\src\lib\extensions\KlasaUserStore.js:7:30) at Module._compile (internal/modules/cjs/loader.js:776:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10) at Module.load (internal/modules/cjs/loader.js:643:32) at Function.Module._load (internal/modules/cjs/loader.js:556:12) at Module.require (internal/modules/cjs/loader.js:683:19) at require (internal/modules/cjs/helpers.js:16:16) at Object. (C:\Users\Marijn\Desktop\Discord-Bot-Listing\node_modules\klasa\src\lib\Client.js:25:24) at Module._compile (internal/modules/cjs/loader.js:776:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! discordbotlist@3.0.0 start: node src/index.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the discordbotlist@3.0.0 start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Marijn\AppData\Roaming\npm-cache_logs\2020-04-12T07_00_22_644Z-debug.log

This is because klasa does not yet support discord v 12

Sank6 commented 4 years ago

This is because klasa does not yet support discord v 12

downgrade your d.js version

Mairon31 commented 4 years ago

@Sank6 Changing the discord.js version from v12 to v11 produces an error:

/rbd/pnpm-volume/41f6e4db-5c97-4272-ae39-f47b9c614acf/node_modules/.github.com/dirigeants/klasa/7fbd351c1276a171fdc854bc99f05b5ef89eb32b/node_modules/klasa/src/lib/extensions/KlasaGuild.js:3 module.exports = Structures.extend('Guild', Guild => { ^ TypeError: Cannot read property 'extend' of undefined

Sank6 commented 4 years ago

Hmm that's odd. Contact Klasa support. I think that might be an issue on their side.

Mairon31 commented 4 years ago

@Sank6 I managed to get it to work with discord.js v12 and stripping klasa of the #settings in packages.js, but there was another problem when I try to publish a bot an error occurs and the logs shows this: [2020-04-14 21:20:34] Error [ERR_UNHANDLED_ERROR]: Unhandled error. (Uncaught Promise Error: [2020-04-14 21:20:34] TypeError: req.app.get(...).users.get is not a function, do you know what this is if it is already connected to mongodb and the rest? 77998287-c50bea80-7328-11ea-9fff-2fb4727cf604

Sank6 commented 4 years ago

Yeah, you still need the settings package. It manages the MongoDB

Mairon31 commented 4 years ago

@Sank6 I wanted to say that everything was already connected, the only error is when trying to publish the bot or enter your profile in /me

If you want to see my project enter here https://listebots.glitch.me

Sank6 commented 4 years ago

Yes, that's because it uses the settings part of Klasa for those endpoints, which is why those errors happen.

Mairon31 commented 4 years ago

And what can I do to fix it? if i add the #settings in package.json it generates the error i wrote above 😞

Mairon31 commented 4 years ago

@Sank6 Can you read the issue i added in the other repository in:

https://github.com/Sank6/Backup

SynCode05 commented 4 years ago

Yep Same error

SynCode05 commented 4 years ago

@Sank6 I think i fixed it, I replaced UserStore with UserManager It works now! I think the packages aren't updated to V12 all Store became Manager

SynCode05 commented 4 years ago

TypeError: this.users.get is not a function this error now.

Mairon31 commented 4 years ago

@SynCode05 Me too

SynCode05 commented 4 years ago

Glad to see we're making progress.

Mairon31 commented 4 years ago

@SynCode05 what file is the UserStore in?

SynCode05 commented 4 years ago

@Mairoooon, start the bot you should see a directory at Object. (/Users/u/Desktop/DBL/node_modules/klasa/src/lib/extensions/KlasaUserStore.js:7:30) It's in KlasaUserStore.js

Mairon31 commented 4 years ago

@SynCode05 It worked for me when I removed #settings from klasa in package.json, everything worked but this.user.get error occurs...

Sank6 commented 4 years ago

Fixed it: 27fccda. It was a Klasa error that was fixed in the master branch as you said, and a missed bit of d.js v12 code on my side. Should work now. Re-install your dependencies.