Upgrading to TypeScript 6.0: Checklist for Smooth Build

TypeScript 6.0 Will Break Your Build (This Checklist Saved Me Hours For Upgrading 3 Projects) . . It was Friday 4 PM when I was working on a Node.js project upgrade to TypeScript 6.0. I upgraded the version in package.json. I thought it was my last change and reinstalled dependencies. When I ran the build, it started to fail with a bunch of errors in terminal. I went through the TypeScript 6.0 announcement in detail and created a series of checklist that helped me upgrade 2 more projects in very less time than it took me for the first one. Let me give you a trick that I used for other 2 projects: * Before you npm install typescript@latest, run this: npx tsc --showConfig | grep -E 'strict|types|rootDir|module|target' and compare to 5.9. * Then add "types": ["node"] (plus whatever your env needs) and set rootDir explicitly if outputs are nesting. Fixes the fs/process errors and path changes for most projects and often speeds builds 20-50%. I have added a full breakdown in my Medium article. [Link in the first comment] #javascript #typescript #reactjs #web #software

  • No alternative text description for this image

To view or add a comment, sign in

Explore content categories