ts-node
npmv10.9.2TypeScriptTypeScript execution environment and REPL for node.js, with source map support
Adopt with care
ts-node is usable, with caveats. Last published 1006 days ago.
- AAdoption: grade A, Excellent.
42.2M downloads per week and 38 known dependents.
- DMaintenance: grade D, Poor — a real concern.
Last published 1006 days ago.
- BWeight: grade B, Good.
Pulls in 16 transitive packages, about 2.3 MB installed.
- ASupply chain: grade A, Excellent.
No install scripts, 2 maintainers, and a contained dependency surface.
- ALicense: grade A, Excellent.
MIT — permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding ts-node to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Licenses in the dependency tree
Every license you inherit by installing ts-node, not just its own. Check this before a legal review, not after.
Compatibility
- Node.js
- No constraint declared
- Module format
- CommonJS only
- TypeScript
- Types included
- Install scripts
- None
Quick start
A usage example from the ts-node README.
Including options within the shebang requires the [`env -S` flag](https://manpages.debian.org/bullseye/coreutils/env.1.en.html#S), which is available on recent versions of `env`. ([compatibility](https://github.com/TypeStrong/ts-node/pull/1448#issuecomment-913895766))
```typescript twoslash
#!/usr/bin/env -S ts-node --files
// This shebang works on Mac and Linux with newer versions of env
// Technically, Mac allows omitting `-S`, but Linux requires itts-node vs the alternatives
Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.
| Package | Weekly downloads | Dependents | License | Last release |
|---|---|---|---|---|
| ts-nodethis page | 42.2M | 38 | MIT | 2 years ago |
| tsx | 61.9M | 26 | MIT | 1 day ago |
| type-fest | 337.8M | 6 | (MIT OR CC0-1.0) | 1 day ago |
| drizzle-orm | 19M | 0 | Apache-2.0 | 1 day ago |
| valibot | 16.8M | 5 | MIT | 1 day ago |
| sql-escaper | 5M | 1 | MIT | 1 day ago |
Dependencies
Declared by ts-node v10.9.2. Runtime dependencies are installed with the package; dev dependencies are not.
Runtime (13)
Peer (4)
Dev (31)
Used by
Popular packages that depend on ts-node.
Reactive Extensions for modern JavaScript
Source maps support for istanbul
High performance (de)compression in an 8kB package
Fully featured SOCKS proxy client supporting SOCKSv4, SOCKSv4a, and SOCKSv5. Includes Bind and Associate functionality.
The postgres client/server binary protocol, implemented in TypeScript
Fire events the same way the user does
A memoization library which only remembers the latest invocation
Parse and lookup IP network blocks
MongoDB connection strings, based on the WhatWG URL API
A Node.js communication port that can pass messages synchronously between workers
Official client encryption module for the MongoDB Node.js driver
The official MongoDB driver for Node.js
A batteries-included SQL query & schema builder for PostgresSQL, MySQL, CockroachDB, MSSQL and SQLite3
Run a subprocess synchronously and interactively in Node.js
A bson parser for node.js and the browser
A Fetch API-compatible PlanetScale database driver
A socket implementation that can run on Cloudflare Workers using native TCP connections.
A library for deep (recursive) merging of Javascript objects
Type-safe implementation of EventEmitter for browser and Node.js
Type-safe implementation of invariant with positionals.
when you want to fire an event no matter how a process exits.
Find apps installed on your system. This util will help to find executables of a known app like Chrome, Firefox,... on Windows, Linux, and macOS out of the box.
Microsofts' EdgeDriver for Node.js
Mozilla's Geckodriver for Node.js
Relationship graph
Dependencies (left) and dependents (right) of ts-node.
Frequently installed together
TypeScript definitions for node
An AST-based pattern checker for JavaScript.
Prettier is an opinionated code formatter
Delightful JavaScript Testing.
An extremely fast JavaScript and CSS bundler and minifier.
BDD/TDD assertion library for node.js and the browser. Test framework agnostic.
Fast, unopinionated, minimalist web framework
TypeScript definitions for chai
Fixes stack traces for files with source maps
React is a JavaScript library for building user interfaces.
React package for working with the DOM.
The semantic version parser used by npm.
Release history
No releases in the last two years, typically about 29 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 10.9.2latest | 2 years ago | 740 KB | MIT |
| 11.0.0-beta.1 | 2 years ago | 724 KB | MIT |
| 10.9.1 | 4 years ago | 729 KB | MIT |
| 10.9.0 | 4 years ago | 728 KB | MIT |
| 10.8.2 | 4 years ago | 707 KB | MIT |
| 10.8.1 | 4 years ago | 707 KB | MIT |
| 10.8.0 | 4 years ago | 706 KB | MIT |
| 10.7.0 | 4 years ago | 612 KB | MIT |
| 10.6.0 | 4 years ago | 577 KB | MIT |
| 10.5.0 | 4 years ago | 563 KB | MIT |
| 10.4.0 | 4 years ago | 533 KB | MIT |
| 10.3.1 | 4 years ago | 528 KB | MIT |
| 10.3.0 | 4 years ago | 528 KB | MIT |
| 10.2.1 | 5 years ago | 508 KB | MIT |
| 10.2.0 | 5 years ago | 508 KB | MIT |
Overview
ts-node is an npm package that typeScript execution environment and REPL for node.js, with source map support. It is extremely widely used, with about 42.2M downloads per week and 38 known dependents in the graph. The latest version is 10.9.2, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need typeScript execution environment and REPL for node.js, with source map support and value a battle-tested, widely-adopted solution.
When not to use it
Consider an alternative if you need to minimize your dependency tree, or if a more actively-maintained option better fits your npm stack.
Pros
- Large, well-established user base (42.2M weekly downloads).
- Ships TypeScript type definitions.
- Clear open-source license (MIT).
Cons
- Large dependency tree (48 direct dependencies) increases install size and audit surface.
Auto-generated from collected registry metadata. No external claims are inferred.
Maintainers
Frequently asked questions
Should I use ts-node?
ts-node is usable, with caveats. Last published 1006 days ago.
How do I install ts-node?
Run `npm install ts-node` to add ts-node to your npm project.
How many dependencies does ts-node have?
ts-node declares 48 direct dependencies and pulls in 16 packages in total once its runtime tree is resolved totalling about 2.3 MB on disk.
What license is ts-node released under?
ts-node is distributed under the MIT license. Its dependency tree also includes: BSD-3-Clause, ISC, MIT.
How popular is ts-node?
ts-node has approximately 42,173,859 downloads per week and 38 known dependent packages.
Is ts-node still maintained?
The most recent release of ts-node (v10.9.2) was published 2 years ago.
Does ts-node run install scripts?
No. ts-node does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.