{"id":15713,"library":"naka-bundler","title":"Naka Bundler","description":"The `naka-bundler` package (current version 0.0.7) provides a specialized command-line interface (CLI) for bundling and transpiling JavaScript and TypeScript files. It acts as a lightweight wrapper around Bun, leveraging Bun's performance characteristics to achieve fast compilation times. Developed as an integral part of the `naka` project, it specifically targets browser automation workflows, optimizing file transformations for that context. A key design principle is its performance, achieved by compiling itself into an executable binary using Bun. This allows for rapid execution without reliance on a globally installed `bun` runtime for the end-user. The bundler offers a \"batteries-included\" experience with no configuration options, making it ideal for straightforward bundling tasks where customization is not required. For advanced or custom configurations, users are advised to interact with Bun directly rather than through `naka-bundler`. As an early-stage project (v0.0.7), its release cadence is likely tied to the development of the broader `naka` ecosystem.","status":"active","version":"0.0.7","language":"javascript","source_language":"en","source_url":"https://github.com/johno/naka","tags":["javascript","typescript"],"install":[{"cmd":"npm install naka-bundler","lang":"bash","label":"npm"},{"cmd":"yarn add naka-bundler","lang":"bash","label":"yarn"},{"cmd":"pnpm add naka-bundler","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"This package is a CLI tool and does not expose a programmatic API for direct import. It should be invoked via `npx naka-bundler` from the command line.","wrong":"import nakaBundler from 'naka-bundler'","symbol":"nakaBundler","correct":"(N/A - CLI tool)"},{"note":"The `naka-bundler` package is designed exclusively for command-line usage. No functions or symbols are exported for programmatic consumption from JavaScript/TypeScript modules.","wrong":"import { bundle } from 'naka-bundler'","symbol":"bundle","correct":"(N/A - CLI tool)"},{"note":"Attempting to `require()` this package will result in a runtime error as it provides no CommonJS exports and is intended solely for CLI execution.","wrong":"const nakaBundler = require('naka-bundler')","symbol":"nakaBundler (CommonJS)","correct":"(N/A - CLI tool)"}],"quickstart":{"code":"npx naka-bundler src/index.ts dist/out\n# Example with more files or different extensions:\nnpx naka-bundler frontend/main.tsx dist/bundle\nnpx naka-bundler backend/api.js build/server","lang":"typescript","description":"Illustrates bundling 'src/index.ts' and outputting the transpiled result to the 'dist/out' directory using the `naka-bundler` CLI."},"warnings":[{"fix":"Consult the latest GitHub README for current CLI usage. Use tools like `npm install naka-bundler@0.0.7` to pin the version in your projects.","message":"As `naka-bundler` is in early development (v0.0.7), expect frequent and unannounced breaking changes in its CLI arguments, behavior, and underlying Bun integration. Pinning exact versions is highly recommended.","severity":"breaking","affected_versions":">=0.0.0"},{"fix":"For customizable bundling needs, utilize `bun` directly, which offers extensive configuration, or explore other bundlers like Webpack, Rollup, or Esbuild.","message":"The `naka-bundler` is explicitly designed with *no configuration options*. Any bundling requirements beyond its opinionated defaults (e.g., custom plugins, different loaders, advanced optimizations) are not supported.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Interact with `naka-bundler` exclusively through your shell or scripts via `npx naka-bundler ...`.","message":"This package is a pure CLI tool and does not expose any programmatic API for use within JavaScript or TypeScript code. Attempting to `import` or `require` it will lead to errors.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"last_verified":"2026-04-21T00:00:00.000Z","next_check":"2026-07-20T00:00:00.000Z","problems":[{"fix":"This package is a CLI. Do not import it; instead, run it directly from your terminal using `npx naka-bundler entry.ts output_dir`.","cause":"Attempting to `import` or `require` `naka-bundler` as a library module.","error":"Error: Cannot find module 'naka-bundler' or TypeError: naka_bundler_1.default is not a function"},{"fix":"Ensure `npm` is installed and updated. Use `npx naka-bundler ...` to execute, which handles on-demand installation, or install globally with `npm install -g naka-bundler` for frequent direct invocation.","cause":"`naka-bundler` is not installed globally, or `npx` cannot locate it in the current environment's `PATH`.","error":"naka-bundler: command not found"},{"fix":"Verify the absolute or relative path to your entry TypeScript/JavaScript file. Ensure the file specified actually exists at the provided location.","cause":"The provided entry file path in the CLI command is incorrect, or the specified file does not exist at that location.","error":"Error: Input file 'path/to/entry.ts' does not exist"}],"ecosystem":"npm"}