VSCode inconvinience

My code runs fine with tsc and with ts-node but when i start vscode it starts to generate errors and idk why is that.
No description
20 Replies
d.js toolkit
d.js toolkit7d ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!
Ghostsnip3rr
Ghostsnip3rrOP7d ago
DJS: v14.16 Node: v22.11
d.js docs
d.js docs7d ago
In TypeScript the ActionRowBuilder class has a generic type parameter that specifies the type of component the action row holds:
const row = new ActionRowBuilder<ButtonBuilder>().addComponents(button)
const row = new ActionRowBuilder<StringSelectMenuBuilder>().addComponents(selectMenu)
const row = new ActionRowBuilder<TextInputBuilder>().addComponents(textInput)
const row = new ActionRowBuilder<ButtonBuilder>().addComponents(button)
const row = new ActionRowBuilder<StringSelectMenuBuilder>().addComponents(selectMenu)
const row = new ActionRowBuilder<TextInputBuilder>().addComponents(textInput)
Ghostsnip3rr
Ghostsnip3rrOP7d ago
No description
No description
Ghostsnip3rr
Ghostsnip3rrOP7d ago
ik that also if that was the case it will not run with ts-node, do you even read what i wrote 😮‍💨
Ghostsnip3rr
Ghostsnip3rrOP7d ago
these methods should be existing in the djs types idk if the version is fucked up or what
No description
No description
mixᴎ
mixᴎ6d ago
I think you you should reinstall discord.js maybe you had a duplicate package My bad i didn't read the issue properly
Ghostsnip3rr
Ghostsnip3rrOP6d ago
No description
No description
Ghostsnip3rr
Ghostsnip3rrOP6d ago
its the same version
d.js docs
d.js docs6d ago
:method: BaseChannel#isSendable() [email protected] Indicates whether this channel is sendable.
Ghostsnip3rr
Ghostsnip3rrOP6d ago
ok yeah but the most things had rly gone wrong
Ghostsnip3rr
Ghostsnip3rrOP6d ago
No description
No description
Ghostsnip3rr
Ghostsnip3rrOP6d ago
first time in my life seeing errors like this
d.js docs
d.js docs6d ago
:typealias: ModalActionRowComponentBuilder [email protected] The builders that may be used within an action row for modals.
Ghostsnip3rr
Ghostsnip3rrOP6d ago
xd a lot of times 😄
Ghostsnip3rr
Ghostsnip3rrOP6d ago
No description
d.js docs
d.js docs6d ago
discord.js includes multiple sub-packages, installing these separately can mess with internal code:
npm uninstall discord-api-types @discordjs/rest @discordjs/builders
yarn remove discord-api-types @discordjs/rest @discordjs/builders
pnpm remove discord-api-types @discordjs/rest @discordjs/builders
npm uninstall discord-api-types @discordjs/rest @discordjs/builders
yarn remove discord-api-types @discordjs/rest @discordjs/builders
pnpm remove discord-api-types @discordjs/rest @discordjs/builders
Ghostsnip3rr
Ghostsnip3rrOP6d ago
lemme try nope didnt work discord.js ButtonStyle ComponentType all red ;2 mhm i could try reinstalling my vscode but i dont think that would help whats the version ot typescript in the latest release of djs?
felix2336
felix23366d ago
I don't think so. I have TS version 5.7.2 as well and didn't face these problems
Ghostsnip3rr
Ghostsnip3rrOP5d ago
wow now it works whats wrong with pnpm xd? djs uses pnpm and pnpm workspaces when i checked the repo thats wild nope its not working with pnpm i tried reinstalling the node modules with pnpm a couple times not working now u told me to reinstall with npm everything works no i just had pnpm lock i think its because of pnpm hoisting i deleted pnpm lock node modules when npm i yeah i changed to bun idk why pnpm is so buggy

Did you find this page helpful?