{"id":27496,"library":"typescript-bundler","title":"TypeScript Bundler (tsb)","description":"A zero-configuration TypeScript transpiler and bundler that transpiles .ts files to .js/.d.ts, bundles output with tree-shaking of side-effect-free modules, compresses public folder assets (gzip, br2, webp), mangled/prettied output, and generates package.json and settings.js from config files (JS, JSON, YAML, JSON5, INI, Properties). Version 1.0.1 on npm, requires Node >= 8.5.0. Notable: GitHub-only install, no published npm package (install via git), does not support bundling for browser. Alpha-like quality with minimal documentation.","status":"active","version":"1.0.1","language":"javascript","source_language":"en","source_url":null,"tags":["javascript"],"install":[{"cmd":"npm install typescript-bundler","lang":"bash","label":"npm"},{"cmd":"yarn add typescript-bundler","lang":"bash","label":"yarn"},{"cmd":"pnpm add typescript-bundler","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Package only provides a CLI (tsb command), no programmatic API documented.","wrong":"const tsb = require('typescript-bundler');","symbol":"tsb","correct":"import { tsb } from 'typescript-bundler';"},{"note":"No default export; use CLI instead.","wrong":"import tsb from 'typescript-bundler';","symbol":"default import","correct":""},{"note":"CommonJS require fails because package has no main entry.","wrong":"const tsb = require('typescript-bundler');","symbol":"require","correct":""}],"quickstart":{"code":"// Install globally from GitHub\nnpm i -g git+ssh://git@github.com/e2tox/tsb.git\n\n// Create project structure as described in README\n// Example minimal setup:\nmkdir my-project\ncd my-project\nmkdir bin lib public src\ntouch bin/cli.ts lib/index.ts public/index.html package.json tsconfig.json\n\n// Add some code to bin/cli.ts:\n// console.log('Hello from CLI');\n\n// Run bundler\ntsb\n\n// Output will be in dist/ folder (default)\n","lang":"typescript","description":"Install CLI from GitHub, create required project structure, and run zero-config bundling."},"warnings":[{"fix":"Use alternative bundlers like tsup or esbuild for stable releases.","message":"Package is installed directly from GitHub (no npm registry version). Unreliable source, may disappear if repository is private or deleted.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Upgrade Node to a modern version (18+). The package may not work on newer Node due to deprecated APIs.","message":"Requires Node >= 8.5.0, which is extremely outdated and unsupported.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Use subprocess to call 'tsb' CLI if integration needed, or choose a programmatic bundler.","message":"No programmatic API – only CLI usage. Cannot be imported into Node scripts.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Follow exact folder structure: bin/, lib/, public/, src/, index.ts, package.json, tsconfig.json.","message":"Documentation is minimal; project structure is rigidly enforced. Non-standard folder layouts will fail silently.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use a true front-end bundler like webpack, Vite, or esbuild for browser code.","message":"No support for browser bundles; output is Node.js-targeted CommonJS. Cannot be used for front-end bundling.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run 'npm i -g git+ssh://git@github.com/e2tox/tsb.git' from command line, not in package.json.","cause":"Package not available on npm; only installable from GitHub via git URL.","error":"Error: Cannot find module 'typescript-bundler'"},{"fix":"Use CLI only: run 'tsb' from terminal.","cause":"Trying to import typescript-bundler programmatically; no module exports.","error":"ERR_MODULE_NOT_FOUND"},{"fix":"Ensure global install: 'npm i -g git+ssh://git@github.com/e2tox/tsb.git' and verify with 'which tsb'.","cause":"Package not installed or not in PATH.","error":"tsb: command not found"},{"fix":"Upgrade Node to 8.5.0 or higher.","cause":"Node version < 8.5.0 does not support arrow functions used in the package.","error":"SyntaxError: Unexpected token =>"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}