Web Stack Overhaul: Node 24 LTS, Safe Express Patches, and CRA to Vite

· Coding, DevOps, Web Development

I recently helped give a long-running web stack a major overhaul. The old version was still on Node v20, which has reached end-of-life, and npm audit was flagging a pile of vulnerabilities. The frontend in particular was built on the deprecated Create React App (CRA), and many of its High/Critical issues simply had no patch available.

The key changes this time:

  • Upgrade and pin Node 24 LTS: Added .nvmrc and .npmrc (engine-strict=true) so everyone from dev to prod runs the same version, avoiding strange errors at deploy time.
  • Play it safe on the backend: Patch/minor upgrades ONLY, no major version bumps (e.g. staying on Express 4), combined with targeted overrides to clear security vulnerabilities in transitive dependencies.
  • Drop CRA for Vite on the frontend: We put the brakes on CRA and formally migrated to Vite! The refactoring cost was lower than expected — switch to import.meta.env and rename files to the JSX extension — and build speed and dev HMR took off immediately 🚀
  • Lockfile hygiene: Wiped the old node_modules and rebuilt a clean lockfile v3, switched every deployment to npm ci for deterministic builds, and added a CI audit for regular scanning.

The most important rule in tech stack maintenance is “small, fast steps, with stability first”. Upgrading too many majors at once just sets off a cascade of breaking changes. With the vulnerabilities cleared and the tooling upgraded, the whole codebase is healthy again!

Before/after comparison: on the left, the old stack running end-of-life Node v20 with npm audit vulnerabilities and deprecated CRA; on the right, the new stack with Node 24 LTS, Vite, patched Express, a clean lockfile v3 and npm ci, with the motto “small, fast steps, stability first” at the bottom

← Blog