Registry /
devops / esbuild-plugin-ts-checker
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.
esbuildTsChecker
✓ import { esbuildTsChecker } from 'esbuild-plugin-ts-checker'
✗ const esbuildTsChecker = require('esbuild-plugin-ts-checker')
Package is ESM-only; requires esbuild >= 0.12.0.
default import
✓ import { esbuildTsChecker } from 'esbuild-plugin-ts-checker'
✗ import esbuildTsChecker from 'esbuild-plugin-ts-checker'
No default export. Use named import.
Type
✓ import type { EsbuildTsCheckerOptions } from 'esbuild-plugin-ts-checker'
TypeScript types are bundled; import type for options interface.
Shows minimal esbuild build configuration using the type-checker plugin with bundling for Node.js.
import { build } from 'esbuild';
import { esbuildTsChecker } from 'esbuild-plugin-ts-checker';
await build({
entryPoints: ['src/index.ts'],
outdir: 'dist',
bundle: true,
platform: 'node',
target: 'node14',
sourcemap: 'external',
plugins: [esbuildTsChecker()],
});
console.log('Build complete with type checking');
Debug
Known issues
gotchaPlugin requires esbuild ^0.12.0 or ^0.13.0. Other versions may break.fixUse esbuild 0.12.x or 0.13.x. For esbuild 0.14+, check for updated version of plugin.
affects: <0.12.0 || >0.13.0 || >=0.14.0
gotchaIn watch mode, type errors are printed but build does not fail. This may hide errors in CI.fixSet 'failOnError' option to true explicitly, or handle watch mode separately.
affects: *
gotchaTypeScript version must be >=4.0.0 due to worker thread API usage.fixUpgrade TypeScript to 4.0.0 or later.
affects: <4.0.0
gotchaPlugin uses worker threads; requires Node.js version supporting worker_threads (>=12.0.0).fixUpgrade Node.js to 12 or later.
affects: <12.0.0
Errors
Common errors & fixes
Error: esbuild-plugin-ts-checker requires esbuild ^0.12.0 || ^0.13.0 but found 0.14.x
Version mismatch with peer dependency esbuild.
fixDowngrade esbuild to 0.13.x or check for a newer version of the plugin.
TypeError: Cannot read properties of undefined (reading 'diagnostics')
TypeScript compilation failed or tsconfig.json not found.
fixEnsure tsconfig.json exists with correct path. Pass 'tsconfig' option explicitly if not default.
Audit
Dependencies
esbuildrequiredCore peer dependency for bundling. Plugin integrates with esbuild's plugin system.
typescriptrequiredRequired for type-checking logic. Runs TypeScript compiler in a worker.