Closed Pentagram5237 closed 3 months ago
npm update
The npm update Dosn't Work
This problem needs to be corrected by Lucas. There is also a lint error in biome.
this is a problem which was corrected under shoukaku you simply have to reinstall the npm
hmmm its not work
Delete the typescript folder from the node modules folder, download and unzip this file, then rename the packages folder to typescript and copy it to the node modules folder. It should work fine this time.
npm update
and update code https://github.com/appujet/lavamusic/commit/2cc62efda08affb452d41337a0afd876c54a5e9d
I updated my code to the latest, but I'm still experiencing this symptom. Are you functioning well?
I used npm i and npm update
src/structures/Dispatcher.ts:106:37 - error TS2322: Type '{ encoded: string; }' is not assignable to type 'string'.
106 this.player.playTrack({ track: { encoded: this.current.encoded } });
node_modules/shoukaku/dist/index.d.ts:186:5
186 track: string;
The expected type comes from property 'track' which is declared here on type 'PlayOptions'
This was tested on typescript 5.4.5. But when I test it on 5.5.2, I start getting this error again.
lavamusic@4.3.3 clean:no-log
node ./scripts/clean-no-log.js && npm run build
src/structures/Dispatcher.ts : 81 : 53
error TS2339: Property 'emit' does not exist on type 'ShoukakuClient'. 81 .on("start", () => this.client.shoukaku.emit("trackStart", this.player, this.current, this))
> lavamusic@4.3.3 build
> tsc --project tsconfig.json
src/structures/Dispatcher.ts:81:53 - error TS2339: Property 'emit' does not exist on type 'ShoukakuClient'.
81 .on("start", () => this.client.shoukaku.emit("trackStart", this.player, this.current, this))
src/structures/Dispatcher.ts:84:42 - error TS2339: Property 'emit' does not exist on type 'ShoukakuClient'.
84 this.client.shoukaku.emit("queueEnd", this.player, this.current, this);
src/structures/Dispatcher.ts:86:38 - error TS2339: Property 'emit' does not exist on type 'ShoukakuClient'.
86 this.client.shoukaku.emit("trackEnd", this.player, this.current, this);
src/structures/Dispatcher.ts:88:53 - error TS2339: Property 'emit' does not exist on type 'ShoukakuClient'.
88 .on("stuck", () => this.client.shoukaku.emit("trackStuck", this.player, this.current))
src/structures/Dispatcher.ts:89:61 - error TS2339: Property 'emit' does not exist on type 'ShoukakuClient'.
89 .on("closed", (...args) => this.client.shoukaku.emit("socketClosed", this.player, ...args));
src/structures/Dispatcher.ts:106:37 - error TS2322: Type '{ encoded: string; }' is not assignable to type 'string'.
106 this.player.playTrack({ track: { encoded: this.current.encoded } });
node_modules/shoukaku/dist/index.d.ts:186:5
186 track: string;
The expected type comes from property 'track' which is declared here on type 'PlayOptions'
src/structures/Dispatcher.ts:140:34 - error TS2339: Property 'emit' does not exist on type 'ShoukakuClient'.
140 this.client.shoukaku.emit("playerDestroy", this.player);
src/structures/Queue.ts:54:34 - error TS2339: Property 'emit' does not exist on type 'ShoukakuClient'.
54 this.client.shoukaku.emit("playerCreate", dispatcher.player);
src/structures/Shoukaku.ts:26:34 - error TS2339: Property 'emit' does not exist on type 'ShoukakuClient'.
26 this.client.shoukaku.emit(reconnected ? "nodeReconnect" : "nodeConnect", name);
src/structures/Shoukaku.ts:30:34 - error TS2339: Property 'emit' does not exist on type 'ShoukakuClient'.
30 this.client.shoukaku.emit("nodeError", name, error);
src/structures/Shoukaku.ts:34:34 - error TS2339: Property 'emit' does not exist on type 'ShoukakuClient'.
34 this.client.shoukaku.emit("nodeDestroy", name, code, reason);
src/structures/Shoukaku.ts:38:34 - error TS2339: Property 'emit' does not exist on type 'ShoukakuClient'.
38 this.client.shoukaku.emit("nodeDisconnect", name, count);
src/structures/Shoukaku.ts:42:34 - error TS2339: Property 'emit' does not exist on type 'ShoukakuClient'.
42 this.client.shoukaku.emit("nodeRaw", name, reason);
Found 13 errors in 3 files.
Errors Files
7 src/structures/Dispatcher.ts:81
1 src/structures/Queue.ts:54
5 src/structures/Shoukaku.ts:26
J'ai mis à jour mon code au plus tard, mais je rencontre toujours ce symptôme. Fonctionnez-vous bien ?
delete "node_modules" and "package-lock.json" + npm i
aaaaaa still not work
i did npm i
and started the bot and this is the output:
src/structures/Dispatcher.ts:106:37 - error TS2559: Type 'string' has no properties in common with type 'UpdatePlayerTrackOptions'.
106 this.player.playTrack({ track: this.current.encoded });
~~~~~
node_modules/shoukaku/dist/index.d.ts:597:5
597 track?: UpdatePlayerTrackOptions;
~~~~~
The expected type comes from property 'track' which is declared here on type 'PlayOptions'
Found 1 error in src/structures/Dispatcher.ts:106
i did
npm i
and started the bot and this is the output:src/structures/Dispatcher.ts:106:37 - error TS2559: Type 'string' has no properties in common with type 'UpdatePlayerTrackOptions'. 106 this.player.playTrack({ track: this.current.encoded }); ~~~~~ node_modules/shoukaku/dist/index.d.ts:597:5 597 track?: UpdatePlayerTrackOptions; ~~~~~ The expected type comes from property 'track' which is declared here on type 'PlayOptions' Found 1 error in src/structures/Dispatcher.ts:106
Update your code to latest version
Update your code to latest version
im at the latest 4.3.3
Update your code to latest version
im at the latest 4.3.3
Nope, latest is 4.5.0
It's just not pushed as a new release in github yet, so it just downloads the latest code from the main branch
It's just not pushed as a new release in github yet, so it just downloads the latest code from the main branch
it worked
OS: Linux NodeJS version: v22.3.0
Steps: I just followed the install instructions
Result: