3 ms·
Am I doing typescript wrong? Setting up a new project is a 5 minutes task. Npm init, then install express, typescript and some useful middleware. Install eslin
by stackbutterflow 5y ago
Am I doing typescript wrong?
Setting up a new project is a 5 minutes task. Npm init, then install express, typescript and some useful middleware. Install eslint then eslint --init and choose airbnb style guide, and I'm off to go.
And if I take over an existing codebase it just takes npm install then npm run dev <script name> and I can start adding bugs.
With react and vuejs it's even easier with nextjs/nuxtjs.
I never fight dependencies.
Yet I sometimes read stories like yours while typescript/nodejs has only been the smoothest experience I've ever had.
- 5e92cb50239222b 5y agoOf course you won't have any problems with an empty hello world. Now develop it into a medium to big real-world project and let it sit for a year or two, then try to update dependencies (because you need new functionality or to fix some vulnerabilities). It's never easy. For some projects it took me about a week to do this (because of a breaking change in some library that's used everywhere that you are forced to update). I just spent another two hours fighting with breakage because of a library that shall remain nameless. The author introduced yet another major breaking change in a minor release. I'm thinking of migrating to a hand-rolled solution, it probably makes sense in the long run. Edit: just for comparison, the backend for this project is written in Java/Spring. I recently updated it from a five year old Spring version (plus a dozen dependencies from the same time frame), and it took less than an hour to fix everything. This is simply unthinkable in the JS world.