EMPTY_MODULE

why I get error from parseConstructorPreConditionsCooldown when extending class Command? I want to create that class as my base class command and make it a plugin that I'm going to use on my other projects. I get the error when debugging why my class is identified as Empty_Module
7 Replies
Spinel
Spinel2mo ago
1. Which version of @sapphire/framework are you using? 2. What's your file/folder structure? 3. Did you use the CLI to generate your bot? 4. What's your main (CJS) or module (ESM) property in package.json 5. Are you using TypeScript? And if so, how are you compiling and running your code? That is to say, what are your build and startup scripts? - Did you remove your output folder and rebuild then try again? 6. Is your problem related to message commands? Did you add loadMessageCommandListeners to your SapphireClient options Remember that if you are new to @sapphire/framework it is important that you read the user guide.
noxzym
noxzym2mo ago
1. both my package and my projek that use the package using 5.2.1 2. attached 3. no 4. dist/index.js with type set to module 5. im just using tsc --build * yes but that error still apears 6. no
/root
- /src
- /commands
- /general
- PingCommand.ts
- /structures
- MyClient.ts
- package.json
- tsconfig.json
/root
- /src
- /commands
- /general
- PingCommand.ts
- /structures
- MyClient.ts
- package.json
- tsconfig.json
may you can check my custom class command in the github https://github.com/stegripe/packages/tree/main/packages/command-context just for additional information, before I move the code into dedicated project for plugin, that code works perfectly without getting any issue
MRDGH2821
MRDGH28212mo ago
Downgrade typescript to 5.4.5 perhaps?
noxzym
noxzym2mo ago
I dont think so... Ive try to publish it to npm and install it on my project and work as well Its like npm link issue or something?
Favna
Favna2mo ago
I'm not sure if you ever solved this but I will have to say you're probably over-engineering a lot with all that custom stuff. I really would recommend going back to basic and dropping all the context stuff. It really isn't worth all the extreme complexity to go from interaction.guild to this.guild for example.
noxzym
noxzym2mo ago
np, I know what Im doing 👍🏻
Want results from more Discord servers?
Add your server