Tomato6966 / lavalink-client

Easy, flexible and feature-rich lavalink@v4 Client. Both for Beginners and Proficients.
https://tomato6966.github.io/lavalink-client/
MIT License
56 stars 23 forks source link

TypeError: Cannot set properties of undefined (setting 'queueStore') #6

Closed howardliam closed 1 year ago

howardliam commented 1 year ago

I receive this error consistently when attempting to use this package in my project (built with TS). I have used different version of the package, 1.1.7 and development branch, and the same error occurs each time. I normally run through ts-node, but I have also compiled the project to JS and it yields the exact same errors.

/home/liam/code/discord-projects/sinf-music/node_modules/lavalink-client/dist/cjs/structures/LavalinkManager.js:78
            this.options.queueOptions.queueStore = new Queue_1.DefaultQueueStore();
                                                 ^
TypeError: Cannot set properties of undefined (setting 'queueStore')
    at LavalinkManager.validateAndApply (/home/liam/code/discord-projects/sinf-music/node_modules/lavalink-client/dist/cjs/structures/LavalinkManager.js:78:50)
    at new LavalinkManager (/home/liam/code/discord-projects/sinf-music/node_modules/lavalink-client/dist/cjs/structures/LavalinkManager.js:95:14)
    at Bot.<instance_members_initializer> (/home/liam/code/discord-projects/sinf-music/src/client/Bot.ts:45:23)
    at new Bot (/home/liam/code/discord-projects/sinf-music/src/client/Bot.ts:73:9)
    at Object.<anonymous> (/home/liam/code/discord-projects/sinf-music/index.ts:2:1)
    at Module._compile (node:internal/modules/cjs/loader:1275:14)
    at Module.m._compile (/usr/lib/node_modules/ts-node/src/index.ts:1618:23)
    at Module._extensions..js (node:internal/modules/cjs/loader:1329:10)
    at Object.require.extensions.<computed> [as .ts] (/usr/lib/node_modules/ts-node/src/index.ts:1621:12)
    at Module.load (node:internal/modules/cjs/loader:1133:32)
Tomato6966 commented 1 year ago

Thanks for the report, will fix it with next release. Could you please sent how you declare your manager? Like all manager options. thanks

however, theoretically it should be fixed after today's commit

Tomato6966 commented 1 year ago

Closing issue as asuming that it's fixed