Closed dl-tg closed 1 year ago
Did you tried ts-node --esm src/main.ts
?
Thanks! Solved it.
This is still an issue for me, with a fresh install with the npx command
@CodeStarrk Just to note, If you're running the latest node version (v20), ts-node has still not been updated to run on it. You may have to either go back to using node v18, Have a script clean, compile and then build using typescript or find a different runtime engine similar to ts-node.
If it is the fact you're using node version 20 most people have been swapping to use something called tsx however tsx does not support emitDecoratorMetadata which I do believe is something that Discordx NEEDS to have enabled. There are other runtime engines but haven't played around with them, If you find something that works please post it here, It would be very helpful. 😄
yeah thanks, I am aware about this. will update in templates as well.
What happened?
run main.ts using ts-node;
Reproduction
ts-node main.ts
tsconfig.json: `{ "compilerOptions": { "target": "ESNext", "module": "ESNext", "outDir": "build", "rootDir": "src", "strict": true, "moduleResolution": "Node", "allowSyntheticDefaultImports": true,
}, "exclude": ["build", "node_modules"], "type": "module", }`
Package
discordx
Version
Stable
Relevant log output
Code of Conduct