TypeScript watch and starting bot taking over a minute

Hello, I'm relatively new to NodeJS etc. I started a new project trying to learn more TypeScript with SapphireJS and I installed it with pnpm and am trying to use TypeScript, I am coming from discord.py where I've become used to not having to compile code and having my bot start in less than 10 seconds, which is already considered way too much. I don't know if this an issue with my incompetence or with my computer, but running pnpm tsc --outDir dist/ -w src/*.ts and updating once of my source files takes way too long to be able to debug it properly and starting the bot takes roughly over a minute. Is there anything I'm doing wrong or is that normal?
8 Replies
Favna
Favna2y ago
Other than that normally you'd set up a tsconfig file so you don't need to provide the params everytime (and your current setup is very... Non strict) There isn't. That's definitely a problem with your system though.
theo
theoOP2y ago
I have a Ryzen 5 3600X tho, why should that not work? Or are there other factors the perfomance relies on I'll see if the performance is better when using the CLI When using the CLI Visual Studio Code can't find any of the installed modules
Favna
Favna2y ago
That's weird. Can't tell you what that is. Did you select pnpm when generating with the cli? Anyway the sapphire CLI is not a compiler in and of itself so... And the only thing that really affects speed beyond processing capabilities is file count and complexity.
Krish
Krish2y ago
how do you start your bot? Are you using nodemon or something?
theo
theoOP2y ago
There's only npm and yarn as the options I had it running in wsl2 previously and now after I've generated it with the CLI and am running it in windows it seems fine
Favna
Favna2y ago
Oh my bad apparently we haven't released pnpm yet And this sounds like a WSL2 issue then I can guarantee a bot should not be that slow by default
theo
theoOP2y ago
Oh well, I‘m too lazy to debug it for 3 hours and getting basically no benefits from it so I‘ll just run it in windows
Favna
Favna2y ago
There are people who swear by developing in WSL but personally I just don't see the advantage. Powershelll 7 (not the default installed version 5, it's a separate install) is powerful enough that shell is not needed at all and basically everything runs under Windows anyway.
Want results from more Discord servers?
Add your server