{"id":21307,"library":"esno","title":"esno","description":"A Node.js runtime enhanced with esbuild for loading TypeScript and ESM modules. Version 4.8.0 is current and stable, with frequent releases alongside tsx. esno is essentially an alias of tsx (formerly esno was separate, now merged into tsx package). Differentiator: auto CJS/ESM mode detection, seamless TypeScript execution without config, and caching for faster reloads. Suitable for scripts, CLIs, and development servers.","status":"active","version":"4.8.0","language":"javascript","source_language":"en","source_url":"https://github.com/esbuild-kit/esno","tags":["javascript"],"install":[{"cmd":"npm install esno","lang":"bash","label":"npm"},{"cmd":"yarn add esno","lang":"bash","label":"yarn"},{"cmd":"pnpm add esno","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"esno v0.15+ is an alias of tsx, which is the core runtime","package":"tsx","optional":false}],"imports":[{"note":"esno provides a CLI only, not a programmatic API. The default import is a no-op function; use tsx for programmatic usage.","wrong":"const esno = require('esno')","symbol":"default","correct":"import esno from 'esno'"},{"note":"For programmatic transform, import 'tsx' directly (esno delegates to tsx).","wrong":"import 'esno'","symbol":"tsx","correct":"import 'tsx'"},{"note":"esno's register hook is not a CommonJS module; use the -r flag.","wrong":"require('esno')","symbol":"require('esno')","correct":"node -r esno/register script.ts"}],"quickstart":{"code":"npx esno hello.ts","lang":"typescript","description":"Run a TypeScript file directly using esno, which transpiles with esbuild and executes with Node.js."},"warnings":[{"fix":"Use tsx package instead for new projects or if you need programmatic API.","message":"From v0.15, esno is an alias of tsx; all issues must be reported in esbuild-kit/tsx.","severity":"breaking","affected_versions":">=0.15"},{"fix":"Migrate to 'tsx' for future updates and support.","message":"The 'esno' package itself is deprecated in favor of 'tsx'.","severity":"deprecated","affected_versions":">=0.15"},{"fix":"Use 'tsx' package for transform or register hooks in code.","message":"esno does not provide a programmatic API; importing it is a no-op.","severity":"gotcha","affected_versions":">=0.15"},{"fix":"Use node -r esno/register script.ts instead of programmatic require.","message":"If using require('esno'), it will not register the TypeScript loader; use -r esno/register.","severity":"gotcha","affected_versions":">=0.15"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Use 'tsx' package: import 'tsx' or use npx tsx.","cause":"Using esno as a programmatic import but it's a CLI-only package.","error":"ERR_MODULE_NOT_FOUND: Cannot find module 'esno' imported from"},{"fix":"Use tsx for programmatic usage: import 'tsx'.","cause":"Importing esno as a function, but the default export is a no-op.","error":"TypeError: esno is not a function"},{"fix":"Use node -r tsx/register script.ts instead.","cause":"The register path was removed; esno delegates to tsx.","error":"Error: Cannot find module 'esno/register'"},{"fix":"Switch to tsx: npm uninstall -g esno && npm install -g tsx","cause":"esno is now an alias of tsx.","error":"Warning: esno is deprecated; use tsx instead."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}