Issue on upgrade to v4
On loading like any file (listeners and commands) it spits out a TypeError: import_discord2.Permissions is not a constructor error and doesn't load it.
19 Replies
@Helpers (i think i'm allowed to ping this based on the post guidelines)
We're on djs 14, permissions doesn't exist (I think)
it was changed
kinda? It's a bit weird to ping directly after making your post though
Permissions is removed djs v14. Follow the djs v14 migration guide, update all your dependencies, and make sure to completely remove and rebuild any typescript output directory
I know I tried all that
This is with the compiled code
I get no errors on compiling
It looks like you have an older sapphire version compared to the djs one
Djs v14.7.0 I think
What's the latest sapphire v14.0.0 supports
it should work
whats your sapphire version
Weird
4.0.0
hm,mm
can you nuke node_modules and reinstall
I also tried that
I can try again thou h
Delete compiled and node modules
But I'll have to wait till after school
Oh wait should I also delete package lock
might help
Error when loading '/home/container/projects/ClubTools/dist/listeners/utils/status.js': TypeError: import_discord2.Permissions is not a constructor
@Vladdy that's my package.json, ive nuked dist, node modules and package lock and reinstalled, it's still throwing the same error
it compiles properly but doesn't start
i have no idea how to fix this
@Ararou your tsconfig lib fix didnt do a thing either btw
yeah i am lost
gonna try rebooting the code server
Solution
wait, i didn't update decorators
let's see if that's it
i swear to god
that was the issue
I hate everything
you should look up what a dev dependency is
Probably
Ok all works
Y'all can close this now
.
Mf
Did you even see what I sent in your dev server
Always update all your dependencies. Use something like vscode version lens
Gonna be honest no