Registry / devops / tsc-absolute

tsc-absolute

JSON →
library1.0.1jsnpmunverified

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.

npm install tsc-absolute
INSTALL
IMPORT
SIG · TSC-ABSOLUTE
T
tsc-absolute
devopsjavascriptv1.0.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default (executable)
npx tsc-absolute --strict
npx tsc --strict
tsc-absolute is used as a CLI tool, not imported as a module. Replace 'tsc' with 'tsc-absolute' in your npm scripts.
TypeScript configuration
tsc-absolute --project tsconfig.json
tsc-absolute -p tsconfig.json
All tsc CLI flags are passed through unchanged. The typical use is as a drop-in replacement.
Node.js child_process exec
execSync('npx tsc-absolute --noEmit', {cwd: '/path'})
require('tsc-absolute')
tsc-absolute is a CLI wrapper; it does not expose a programmatic API. Use child_process to invoke it.

Shows installation, script setup, and expected output with absolute file paths in error messages.

// 1. Install npm install --save-dev typescript tsc-absolute // 2. Add to package.json scripts "scripts": { "build": "tsc-absolute --strict", "typecheck": "tsc-absolute --noEmit" } // 3. Run npm run typecheck // Output includes absolute paths like: // /home/user/project/src/index.ts(10,5): error TS2322: ...
tsc-absolute --version
Debug
Known issues
gotchatsc-absolute uses regex to transform tsc output; it may break if TypeScript changes its logging format. The wrapper is not an official TypeScript feature.
fix
Monitor TypeScript releases for formatting changes; pin TypeScript version if stability is critical.
affects: >=1.0.0
gotchaExtremely unusual filenames (with spaces and brackets) can cause regex matching errors. Most users will never encounter this, but it exists in edge cases.
fix
Avoid filenames with spaces and brackets in project paths, or validate error output manually.
affects: >=1.0.0
breakingRequires TypeScript >=4.6 as a peer dependency. Older TypeScript versions are not tested and may not work.
fix
Upgrade TypeScript to >=4.6.
affects: >=1.0.0
gotchatsc-absolute does not provide a programmatic API; it must be invoked as a CLI tool. Attempting to import it as a module will fail.
fix
Use child_process.exec or similar to run tsc-absolute as a command.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'typescript'
TypeScript is not installed or is a missing peer dependency.
fix
Run 'npm install --save-dev typescript' to install TypeScript >=4.6.
tsc-absolute: command not found
tsc-absolute is not installed globally or accessible via npx.
fix
Run 'npm install --save-dev tsc-absolute' in your project directory, then use 'npx tsc-absolute'.
The 'tsc-absolute' package has no exported member 'default'.
Attempting to import tsc-absolute as a JavaScript module; it is a CLI tool with no module exports.
fix
Do not import tsc-absolute in code. Use it as a command-line tool via npm scripts or npx.
Upgrade
Version history
1.0.1latest on npm
Audit
Dependencies
typescriptrequiredPeer dependency: the actual TypeScript compiler to wrap
Agent activity
5 hits · last 30 days
node
4
OpenAI (training)
1
Resources
tsc-absolute — npm install tsc-absolute · libregistry