35 Replies
- 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!
- ✅
Marked as resolved by OPLib version? TS version?
I'll send my whole package json, moment
just came back
typescript is 5.7.2
I'll also mention I downgraded it to the one I used in my previous project, same issue.
You may need to also install latest
@types/node
same issue.
+ @types/node ^22.10.2
why is typescript not a dev dependency
wouldn't be surprised if that was the issue
never had it set as dev one and it worked
maybe clean install deps?
same issue
I did it like three times already
Unknown User•22h ago
Message Not Public
Sign In & Join Server To View
thats actually weird
now it has worked..?
yeah because that ignores dependency declarations
oh yeah in my previous project my tsconfig had it like that too
Unknown User•22h ago
Message Not Public
Sign In & Join Server To View
what does your tsconfig look like
current one?
yes
oh tsc doesn't really like deps typings
TIL
i guess these errors are related to the library ts version vs local one you're using
does it work if you set lib to es2023
(without skipLibCheck obv)
you mean "target": "ES2023", right
no
okay then guide me please here
Latest node types changed the iterators types...hence the error. There were some pr on DefinitelyTyped to address this, though it's status is kinda unknown
lib = ["es2023"]
yeah
worked
without skiplibcheck, yes
👍
so should I stick with lib or skiplib
TSConfig Reference - Docs on every TSConfig option
From allowJs to useDefineForClassFields the TSConfig reference includes information about all of the active compiler flags setting up a TypeScript project.
i personally wouldnt use skipLibCheck unless necessary
alright thank you all so much for help