{"id":26524,"library":"tsc-absolute","title":"tsc-absolute","description":"A drop-in wrapper for the TypeScript compiler (tsc) that converts relative file paths in error messages to absolute paths. Current stable version is 1.0.1, released periodically with no fixed cadence. Key differentiator: solves a long-standing TypeScript feature request without modifying the compiler itself. Useful for monorepo navigation and CI/CD error parsing. Acts as a simple regex-based log transformer, requiring TypeScript >=4.6 as a peer dependency. Ships with TypeScript types and works in any environment where tsc runs, but accuracy depends on TypeScript's logging format staying stable.","status":"active","version":"1.0.1","language":"javascript","source_language":"en","source_url":"https://github.com/domdomegg/tsc-absolute","tags":["javascript","typescript"],"install":[{"cmd":"npm install tsc-absolute","lang":"bash","label":"npm"},{"cmd":"yarn add tsc-absolute","lang":"bash","label":"yarn"},{"cmd":"pnpm add tsc-absolute","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency: the actual TypeScript compiler to wrap","package":"typescript","optional":false}],"imports":[{"note":"tsc-absolute is used as a CLI tool, not imported as a module. Replace 'tsc' with 'tsc-absolute' in your npm scripts.","wrong":"npx tsc --strict","symbol":"default (executable)","correct":"npx tsc-absolute --strict"},{"note":"All tsc CLI flags are passed through unchanged. The typical use is as a drop-in replacement.","wrong":"tsc-absolute -p tsconfig.json         ","symbol":"TypeScript configuration","correct":"tsc-absolute --project tsconfig.json"},{"note":"tsc-absolute is a CLI wrapper; it does not expose a programmatic API. Use child_process to invoke it.","wrong":"require('tsc-absolute')","symbol":"Node.js child_process exec","correct":"execSync('npx tsc-absolute --noEmit', {cwd: '/path'})"}],"quickstart":{"code":"// 1. Install\nnpm install --save-dev typescript tsc-absolute\n\n// 2. Add to package.json scripts\n\"scripts\": {\n  \"build\": \"tsc-absolute --strict\",\n  \"typecheck\": \"tsc-absolute --noEmit\"\n}\n\n// 3. Run\nnpm run typecheck\n// Output includes absolute paths like:\n// /home/user/project/src/index.ts(10,5): error TS2322: ...","lang":"typescript","description":"Shows installation, script setup, and expected output with absolute file paths in error messages."},"warnings":[{"fix":"Monitor TypeScript releases for formatting changes; pin TypeScript version if stability is critical.","message":"tsc-absolute uses regex to transform tsc output; it may break if TypeScript changes its logging format. The wrapper is not an official TypeScript feature.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Avoid filenames with spaces and brackets in project paths, or validate error output manually.","message":"Extremely unusual filenames (with spaces and brackets) can cause regex matching errors. Most users will never encounter this, but it exists in edge cases.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Upgrade TypeScript to >=4.6.","message":"Requires TypeScript >=4.6 as a peer dependency. Older TypeScript versions are not tested and may not work.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Use child_process.exec or similar to run tsc-absolute as a command.","message":"tsc-absolute does not provide a programmatic API; it must be invoked as a CLI tool. Attempting to import it as a module will fail.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'npm install --save-dev typescript' to install TypeScript >=4.6.","cause":"TypeScript is not installed or is a missing peer dependency.","error":"Error: Cannot find module 'typescript'"},{"fix":"Run 'npm install --save-dev tsc-absolute' in your project directory, then use 'npx tsc-absolute'.","cause":"tsc-absolute is not installed globally or accessible via npx.","error":"tsc-absolute: command not found"},{"fix":"Do not import tsc-absolute in code. Use it as a command-line tool via npm scripts or npx.","cause":"Attempting to import tsc-absolute as a JavaScript module; it is a CLI tool with no module exports.","error":"The 'tsc-absolute' package has no exported member 'default'."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}