Registry / devops / ts-babel-node

ts-babel-node

JSON →
library1.1.1jsnpmunverified

ts-babel-node (v1.1.1) enables Babel compilation of TypeScript output, primarily to support async/await in older Node.js versions. It wraps ts-node to add a Babel transpilation step after TypeScript compilation. Requires peer dependencies typescript and ts-node. Useful for legacy toolchains where Node.js 5.x lacks ES6 support. No longer actively maintained; users should migrate to ts-node with modern Node.js.

npm install ts-babel-node
INSTALL
IMPORT
SIG · TS-BABEL-NODE
T
ts-babel-node
devopsjavascriptv1.1.1
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

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

default
import 'ts-babel-node/register'
import tsBabelNode from 'ts-babel-node'
Module has no default export; use side-effect import for registration
register
import { register } from 'ts-babel-node'
const register = require('ts-babel-node').register
ESM and CJS both work, but ESM import is preferred
registerBabel
import { registerBabel } from 'ts-babel-node'
require('ts-babel-node').registerBabel()
Used when ts-node is already registered, e.g., in gulpfile.ts

Demonstrates basic usage: install peer deps, register ts-babel-node, and run a TypeScript file with async/await.

// Install: npm install --save-dev ts-babel-node typescript@1.8 ts-node // Run a TypeScript file with async/await support // my-script.ts: import { register } from 'ts-babel-node'; register(); async function main() { const result = await Promise.resolve('Hello, ts-babel-node!'); console.log(result); } main().catch(console.error); // Execute: ts-babel-node my-script.ts
ts-babel-node --version
Debug
Known issues
deprecatedPackage is no longer maintained; use ts-node with modern Node.js (>=6) which supports async/await natively.
fix
Remove dependency and rely on ts-node alone.
affects: >=1.0
breakingRequires peer dependency typescript@1.8 or similar; newer TypeScript versions may break compilation.
fix
Pin typescript to a compatible version.
affects: >=1.0
gotchaNode.js version must be <6 to need babel; on modern Node.js, ts-node handles async/await without babel.
fix
Upgrade Node.js and use ts-node directly.
affects: >=1.0
Errors
Common errors & fixes
Error: Cannot find module 'ts-node'
Missing peer dependency ts-node
fix
npm install ts-node
TypeError: Cannot read property 'compile' of undefined
Incompatible TypeScript version (e.g., v2+)
fix
Install typescript@1.8 explicitly: npm install typescript@1.8
SyntaxError: Unexpected token function
Babel not registered; async/await not transpiled
fix
Require 'ts-babel-node/register' before running code.
Upgrade
Version history
1.1.1latest on npm
Audit
Dependencies
typescriptrequiredPeer dependency required for TypeScript compilation
ts-noderequiredPeer dependency required as core runtime
Agent activity
4 hits · last 30 days
node
4
Resources
ts-babel-node — npm install ts-babel-node · libregistry