Let's say I want to create a simple app. Nothing complex, it just needs to connect to a database to support some some basic user auth and CRUD stuff.
TypeScript is probably my strongest language, and everyone says it's great so I'll use it for my backend.
Cool. So first thing we need to do is create a user API for signups. I'm going to need a framework for the API stuff. Express is good, let's go with that...
Okay, now we need to talk to the database. Let's install mysql2, seems popular and well maintained, should be okay.. Do I need a @types package? Nope. Great.
Now I need to create some environment config for connecting to MySQL. Going to need another library for that, I guess. dotenv is popular, should be safe enough...
Hm, actually I probably want to set up some logging too just in case there are SQL/DB errors. Going to need a library that. Looks like log4js would probably work. Is it well maintained / safe? Eh. Should be fine, just need to build this thing...
Right, finally connecting to the DB. How do I do DB migrations? Is there a library for that? Hm, let's check Google... Okay, typeorm seems like it might work. Seems quite popular. Let's try that.
Okay, our tables have been defined and we're connecting to the DB. Great!
Now we can finally create the signup code. Hm, actually, going need to validate email addresses. Do I write an email validator? No, don't be silly, this is the JS ecosystem! There's probably a library for that. validator seems popular, I'll go with that. It's probably safe...
Okay, signup done. That wasn't so hard was it? Just need to connect to the SMTP server to send the email verification email now... Erm, wait... How do I do that in TypeScript exactly? Guess I'll need a library for that.
I won't go on but this is the developer experience of just trying to do something extremely simple in TypeScript. But it gets worse because in two weeks when you come back to the project you'll find several of your libraries have been deprecated so you'll need to spend a few hours refactoring and the docs for the 50 libraries you needed are distributed across 22 websites (2 of which are 404ing) and 28 Github readmes.
In comparison all of this would probably take me about 15 minutes max in Laravel and I wouldn't need to install any 3rd party packages. And if I'm honest I could probably do this in Spring Boot faster too without having to worry about installing malicious, poorly maintained packages along the way.
Like, I swear I must be missing something here because while I acknowledge TypeScript itself is great, the JS ecosystem it's built on is awful. So yeah, sure, TS is better designed that modern PHP, but why anyone developer would choose to use TS for their backend isn't clear to me. Unless you absolutely need TS for writing isomorphic code or something then why bother with the headache?