{"id":26571,"library":"unts","title":"unts","description":"A zero-config tool to run TypeScript files directly without a separate transpilation step. The package is currently at version 0.0.0-pre (unstable, likely pre-release). It differentiates from alternatives like ts-node or tsx by being minimal and dependency-light, with no configuration files or complex setups. Release cadence is unknown due to early stage. Use with caution in production.","status":"deprecated","version":"0.0.0-pre","language":"javascript","source_language":"en","source_url":null,"tags":["javascript"],"install":[{"cmd":"npm install unts","lang":"bash","label":"npm"},{"cmd":"yarn add unts","lang":"bash","label":"yarn"},{"cmd":"pnpm add unts","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Package is ESM-only; CommonJS require() will fail.","wrong":"const unts = require('unts')","symbol":"default (run)","correct":"import unts from 'unts'"},{"note":"Named export run() is available in ESM.","wrong":"const { run } = require('unts')","symbol":"run (named export)","correct":"import { run } from 'unts'"},{"note":"RunOptions is a TypeScript type, import it as type to avoid runtime bundling.","wrong":"import { RunOptions } from 'unts'","symbol":"type RunOptions","correct":"import type { RunOptions } from 'unts'"}],"quickstart":{"code":"import { run } from 'unts';\n\nasync function main() {\n  const result = await run('script.ts', {\n    cwd: process.cwd(),\n    stdio: 'inherit'\n  });\n  console.log('Exit code:', result.exitCode);\n}\n\nmain().catch(console.error);","lang":"typescript","description":"Demonstrates using run() from unts to execute a TypeScript file with options and capture exit code."},"warnings":[{"fix":"Pin to exact version and test thoroughly before upgrading.","message":"Package is version 0.0.0-pre – no stable API; expect breaking changes in any update.","severity":"breaking","affected_versions":"all"},{"fix":"Use import syntax or switch to dynamic import() inside CJS.","message":"CommonJS require() will throw ERR_REQUIRE_ESM – package is ESM-only.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Run npm install --save-dev @types/node to get Node.js type definitions.","message":"TypeScript types are not bundled; users must install @types/node separately.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'npm install unts' and ensure the import statement matches the package name.","cause":"Package not installed or import path incorrect.","error":"Error: Cannot find package 'unts' from ..."},{"fix":"Use 'import unts from \"unts\"' then 'unts.run()', or 'import { run } from \"unts\"'.","cause":"Using default import when named export is expected, or vice versa.","error":"TypeError: unts.run is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}