Jimsalad
SIASapphire - Imagine a framework
•Created by Jimsalad on 8/7/2024 in #sapphire-support
TS App does not attach event listeners once complied, works in dev
Note this also needs to be relevant to where you're booting from, you can't just specify a folder path and it works it out.
10 replies
SIASapphire - Imagine a framework
•Created by Jimsalad on 8/7/2024 in #sapphire-support
TS App does not attach event listeners once complied, works in dev
For anyone that stumbles upon this in future with similar symptoms (app booting, bot is registered online in discord but events not picked up) my solution was to update
package.json
's main
parameter to an appropriate value against the compiled JS entrypoint - in my case dist/index.js
.10 replies
SIASapphire - Imagine a framework
•Created by Jimsalad on 8/7/2024 in #sapphire-support
TS App does not attach event listeners once complied, works in dev
As always, typing the problem out helps you solve it 😅 Thanks for being a rubber duck...
10 replies
SIASapphire - Imagine a framework
•Created by Jimsalad on 8/7/2024 in #sapphire-support
TS App does not attach event listeners once complied, works in dev
Finally,
index.ts
looks like this and is the root of my application
10 replies
SIASapphire - Imagine a framework
•Created by Jimsalad on 8/7/2024 in #sapphire-support
TS App does not attach event listeners once complied, works in dev
Compiled app is started via a
node ./index.js
command relative to the /dist
folder. Dist folder looks like the below once built via Dockerfile
10 replies
SIASapphire - Imagine a framework
•Created by Jimsalad on 8/7/2024 in #sapphire-support
TS App does not attach event listeners once complied, works in dev
My tsconfig.json
10 replies
SIASapphire - Imagine a framework
•Created by Jimsalad on 8/7/2024 in #sapphire-support
TS App does not attach event listeners once complied, works in dev
My package.json dependencies and scripts:
10 replies