TypeScript Path Alias Resolver

JSON →
library 4.2.0 ·javascript
verified May 27, 2026

tsconfig-paths is a utility that provides runtime support for TypeScript's path mapping feature, allowing Node.js to resolve modules based on the `paths` configuration in `tsconfig.json`. This addresses the common issue where TypeScript compiles code successfully using path aliases (e.g., `@lib/utils`), but Node.js fails at runtime because it doesn't understand these mappings. The package, currently at version 4.2.0, functions by hooking into Node.js's module resolution system, typically via a `--require` flag (e.g., `node -r tsconfig-paths/register`) or through a programmatic API. While TypeScript handles `paths` during compilation, tsconfig-paths ensures these aliases work in development environments with `ts-node` or directly with compiled JavaScript, making it a critical tool for maintaining clean import paths and structured projects without additional build steps or manual path adjustments for runtime execution. Its release cadence is generally tied to bug fixes and compatibility updates, not a strict schedule.

total hits 14
actors 5 distinct systems
last hit 2d ago ChatGPT-User
GPTBot
5
Script
1
ChatGPT-User
1
Search engines
1
Humans
3

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇸🇬 Singapore · 🇩🇪 Germany