
Fix TypeScript path aliases not working in Node.js
tsconfig paths are a compile-time fiction. tsc deletes the types and leaves your @/ imports exactly as written, so Node — which never reads tsconfig — has no idea what @/db means.
NodeWire is a practical Node.js and TypeScript publication for backend engineers: production error fixes, build-it tutorials, runtime and framework comparisons, deployment and DevOps, performance and observability, and AI integrations. Start with an error fix if something is broken, a tutorial if you are shipping a feature, or a comparison if you are choosing a stack. Every guide is written by a working engineer and verified on current Node.js LTS.

tsconfig paths are a compile-time fiction. tsc deletes the types and leaves your @/ imports exactly as written, so Node — which never reads tsconfig — has no idea what @/db means.
| Error | What it means / fix |
|---|---|
| — | Fix Prisma connection pool timeout (P2024) in Node.js P2024 usually means Prisma could not get a free connection fast enough. Sometimes the database is overloaded, but more often the app holds connections too long, opens too many clients, or multiplies pools across instances. |
| — | Fix nodemon: command not found A locally installed nodemon is not on your PATH, and it is not supposed to be. Your shell looking for a global binary is the bug, not the missing global install. |
| — | Fix Docker node_modules not found in a Node.js container The image has node_modules. Then your compose bind mount drops your host folder on top of it and hides them. The build was never the problem — the volume was. |
| — | Fix ERR_REQUIRE_ESM in Node.js ERR_REQUIRE_ESM used to mean a painful migration. On Node 22 and 24 it usually means: upgrade Node, because require() can load synchronous ESM — with a small .default tweak for default exports. |
| — | Fix ERR_UNKNOWN_FILE_EXTENSION “.ts” in ts-node ts-node's native ESM support has been a long-running pain point since 2020, and it still isn't reliable. On a type:module project, the cleaner answer is to stop using ts-node. |
| UnhandledRejection | Fix UnhandledPromiseRejection in Node.js It’s 2 a.m., the pager goes off, and your Node 22 service is in a restart loop. The logs show one line — a rejection reason — then… |

I've shipped APIs on all three. Sequelize from 2017 to 2020 on a payments API that's still in production. TypeORM through 2021 on a logistics dashboard, where the migration generator broke twice and burned a sprint each time.…