Random errors after running `npm update`
I accidentally ran npm update in one of the repositories I'm working on (I'm using nodejs v18) and now I just get a bunch of errors on all my slash command builders. I quite frankly don't understand them so I'm hoping someone here could.
28 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!Djs version is 14.13.0
can you show your code?
Which part? The builders or the function?
well, let's start with the definition for SlashCommandSubcommandsOnlyBuilder
i have something which i assume is close to what you have and it seems to work https://tsplay.dev/NloQlw
ugh sorry ,wrong link
https://tsplay.dev/wXLzQw
This is the function that handles the slash command creation ^
This is the class ^
And this is a random command that will throw the error ^
i don't see SlashCommandSubcommandsOnlyBuilder there
exactly
oh my bad, it's a djs thing
this might just be a type issue in the package
aha
it's a known issue, i think? https://github.com/discordjs/discord.js/issues/10256
https://github.com/discordjs/discord.js/pull/10255
for now i'd suggest reverting to the previous version
The thing is im on discord.js v14.13 according to npm list, but it seems to think that im on 14.15.2
try removing node_modules
i did, it installs 14.13 as its supposed to but it still gives me that error
hmm...
try removing package-lock.json as well, then
ideally you wouldn't, but your dependencies are kinda messed up
oh, keep a backup of it first
I did some messing around
lets see if it works now
I honestly don't even understand anymore
Now I'm getting like 30k errors in the console when using npm install
😢
what did you do?
I just deleted every trace of all my node modules and now this is happening
So confusd
????
I don't use these packages at all
they're probably transitive dependencies
check your package-lock.json
not a trace of them there either
for whatever reason discordjs doesn't wanna go back to 14.13.0
Fuck it i gotta force it then
YES
THAT WORKED
WOO
what did you do?
I just force installed djs v14
npm i discord.js@14.13.0
Hopefully they fix the issue soon so I can update to 15.2
I'll try when I get home and confirm if it is or not. Really hoping it is bc I could use the polls feature
Updated to the latest version last night and was still getting the error. I don't think it's fixed
@dan You can use npm uninstall discord.js and install a specific version of the package (older and stable version) with npm install discord.js@the.version.you.want
Hoping it can help 😅
Oh yeah, i know lol. This Is what I did
I don't remember. I'll check again when I'm back home
But discordjs showed 14.15.2 from what I remember
Most of my packages got messed up during the update so I'm just gonna re configure them all. They're all due updates cuz I'm running some old versions
@Qjuh
The error still presists
So it hasn't been fixed in 15.2
It's alright. Guess I'll stick to 14.13.0 for now
for whatever reason that also wants to give me the error... my node modules are severely fucked
from what it's telling me its on 1.7.0
@Qjuh
Yeah
Wait I think I have an idea give me a sec
Okay even though it shows up as 1.7.0 it's actually downloading 1.8 for whatever reason
Yeah
Oh well, I don't mind staying on 14.13.0
it works fine for me
Gotta wait till its fixed to utilize polls