Error: Unexpected server response: 200

When using lavaclient via deno's npm support (I was using lavadeno but that isn't updated to lavalink 4) with a lavalink 4 node I get the following error:
Error: Error: Unexpected server response: 200
at Connection._onerror (file:///home/blocks/.cache/deno/npm/registry.npmjs.org/lavaclient/4.1.1/dist/lib/node/Connection.js:145:33)
at callListener (file:///home/blocks/.cache/deno/npm/registry.npmjs.org/ws/8.16.0/lib/event-target.js:290:14)
at WebSocket.onError (file:///home/blocks/.cache/deno/npm/registry.npmjs.org/ws/8.16.0/lib/event-target.js:230:9)
at WebSocket.emit (ext:deno_node/_events.mjs:383:28)
at emitErrorAndClose (file:///home/blocks/.cache/deno/npm/registry.npmjs.org/ws/8.16.0/lib/websocket.js:1033:13)
at processTicksAndRejections (ext:deno_node/_next_tick.ts:33:15)
at runNextTicks (ext:deno_node/_next_tick.ts:71:3)
at eventLoopTick (ext:core/01_core.js:160:21)
Error: Error: Unexpected server response: 200
at Connection._onerror (file:///home/blocks/.cache/deno/npm/registry.npmjs.org/lavaclient/4.1.1/dist/lib/node/Connection.js:145:33)
at callListener (file:///home/blocks/.cache/deno/npm/registry.npmjs.org/ws/8.16.0/lib/event-target.js:290:14)
at WebSocket.onError (file:///home/blocks/.cache/deno/npm/registry.npmjs.org/ws/8.16.0/lib/event-target.js:230:9)
at WebSocket.emit (ext:deno_node/_events.mjs:383:28)
at emitErrorAndClose (file:///home/blocks/.cache/deno/npm/registry.npmjs.org/ws/8.16.0/lib/websocket.js:1033:13)
at processTicksAndRejections (ext:deno_node/_next_tick.ts:33:15)
at runNextTicks (ext:deno_node/_next_tick.ts:71:3)
at eventLoopTick (ext:core/01_core.js:160:21)
16 Replies
viztea
viztea9mo ago
You need to use lavaclient v5 i've been lazy and keep putting off releasing it to @latest
Bloxs
BloxsOP9mo ago
ah
viztea
viztea9mo ago
npm
lavaclient
A simple, easy-to-use, and flexible lavalink client for node.js. Latest version: 4.1.1, last published: 2 years ago. Start using lavaclient in your project by running npm i lavaclient. There are no other projects in the npm registry using lavaclient.
viztea
viztea9mo ago
despite the semver name thingy, it's not really alpha but it is a rewrite so ¯\_(ツ)_/¯ check pinned thread
Bloxs
BloxsOP9mo ago
this is fine, not like my code was good to begin with
No description
viztea
viztea9mo ago
What is the status around using NPM packages in Deno? i'm personally against it but if there's no reason to keep a dedicated port then I'd rather not keep it
Bloxs
BloxsOP9mo ago
It's preferred to use native deno packages but the support has gotten good enough to where most packages work
viztea
viztea9mo ago
hmm, afaict native would only really consist of switching to the WebSocket global node should be getting that soon
Bloxs
BloxsOP9mo ago
for new projects using smth like dnt would probably be the play but I don't know how viable that would be as I've never tried it
viztea
viztea9mo ago
mmm
Bloxs
BloxsOP9mo ago
am I doing something wrong here? #Project Discussion says you can just do player.on but types say otherwise
No description
viztea
viztea9mo ago
i think it's a dev dependency issue :AHHHH: maybe bruhhhhhhhhhhhh let me just release it typed-emitter is a required dep but it's listed as dev only, idk if there's a way for you to include it somehow working on releasing all the packages rn
viztea
viztea9mo ago
npm
lavaclient
A simple, easy-to-use, and flexible lavalink client for node.js. Latest version: 4.1.1, last published: 2 years ago. Start using lavaclient in your project by running npm i lavaclient. There are no other projects in the npm registry using lavaclient.
Bloxs
BloxsOP9mo ago
not sure if this is like a deno npm compat issue or not
No description
Bloxs
BloxsOP9mo ago
I presume it most likely is because of the fact types say otherwise
viztea
viztea9mo ago
prolly mmm, might be an ESM thing idk
Want results from more Discord servers?
Add your server