{"id":25730,"library":"honey-badger-cli","title":"honey-badger-cli","description":"HoneyBadger is a WIP ES2015+ to ES5 transpiler, bundler, and minifier written in Rust. This package provides a command-line interface and programmatic API (default export Badger class) for the Rust core. Version 0.0.3 wraps HoneyBadger 0.2.1. It is an experimental tool with limited ecosystem support, providing transform (transpile plus optional minify) and parse (AST) operations. No recent updates; likely abandoned.","status":"abandoned","version":"0.0.3","language":"javascript","source_language":"en","source_url":null,"tags":["javascript"],"install":[{"cmd":"npm install honey-badger-cli","lang":"bash","label":"npm"},{"cmd":"yarn add honey-badger-cli","lang":"bash","label":"yarn"},{"cmd":"pnpm add honey-badger-cli","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Package exports a default class. CommonJS require may work but ESM import is recommended.","wrong":"const Badger = require('honey-badger-cli')","symbol":"Badger","correct":"import Badger from 'honey-badger-cli'"}],"quickstart":{"code":"import Badger from 'honey-badger-cli';\nconst instance = new Badger();\nconst code = 'const x = 1;';\nconst result = instance.badger.transform(code, true);\nconsole.log(result);\n\n// CLI usage:\n// $ honey-badger-cli --string \"const x = 1;\" --pretty\n","lang":"javascript","description":"Shows programmatic usage: create Badger instance, call transform with a string and minify=true, and CLI usage with --string."},"warnings":[{"fix":"Ensure Rust toolchain and node-gyp prerequisites are installed. Consider using Docker.","message":"Package is a wrapper around a Rust binary via node-gyp. Native compilation may fail on unknown platforms.","severity":"gotcha","affected_versions":">=0.0.1"},{"fix":"Always use `new Badger()` before calling methods.","message":"The exported Badger class expects to be instantiated; calling Badger.process() without 'new' might throw.","severity":"gotcha","affected_versions":">=0.0.1"},{"fix":"Use `const Badger = require('honey-badger-cli').default` or use ES import.","message":"The default export is a class, not a function. CommonJS users may mistakenly require as a function.","severity":"gotcha","affected_versions":">=0.0.1"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run `npm install honey-badger-cli` and ensure Rust/node-gyp dependencies installed.","cause":"Package not installed or native module failed to build.","error":"Error: Cannot find module 'honey-badger-cli'"},{"fix":"Use `const Badger = require('honey-badger-cli').default` or switch to ES import.","cause":"Using CommonJS require without .default to get the class.","error":"TypeError: Badger is not a constructor"},{"fix":"Install globally with `npm install -g honey-badger-cli` or use npx.","cause":"Global install may have failed or PATH not set.","error":"honey-badger-cli: command not found"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}