{"id":25309,"library":"esbuild-openbsd-64-for-imba","title":"esbuild","description":"esbuild is an extremely fast JavaScript bundler and minifier written in Go. Current stable version is 0.21.x (as of this entry). It is released weekly with frequent bug fixes and features. Key differentiators include unmatched speed (10-100x faster than Webpack/Rollup), native Go implementation, built-in bundling, minification, TypeScript and JSX support, and a plugin API. It is designed for modern ESM and CJS workflows, and provides platform-specific binary packages like esbuild-openbsd-64-for-imba for easy installation.","status":"active","version":"0.0.2035","language":"javascript","source_language":"en","source_url":"https://github.com/evanw/esbuild","tags":["javascript"],"install":[{"cmd":"npm install esbuild-openbsd-64-for-imba","lang":"bash","label":"npm"},{"cmd":"yarn add esbuild-openbsd-64-for-imba","lang":"bash","label":"yarn"},{"cmd":"pnpm add esbuild-openbsd-64-for-imba","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Parent package; this is a platform-specific binary used by esbuild","package":"esbuild","optional":false}],"imports":[{"note":"ESM import is recommended; CJS require also works. Since v0.17, the default export is an object containing all functions.","wrong":"const { build } = require('esbuild')","symbol":"build","correct":"import { build } from 'esbuild'"},{"note":"Used for transforming a single file in memory. Available since v0.6.","symbol":"transform","correct":"import { transform } from 'esbuild'"},{"note":"TypeScript users should import types with `import type` to avoid runtime inclusion.","wrong":"import { BuildOptions } from 'esbuild'","symbol":"BuildOptions","correct":"import type { BuildOptions } from 'esbuild'"}],"quickstart":{"code":"import { build } from 'esbuild';\n\nasync function bundle() {\n  try {\n    const result = await build({\n      entryPoints: ['src/index.js'],\n      outfile: 'dist/bundle.js',\n      bundle: true,\n      minify: true,\n      platform: 'browser',\n      target: ['es2020'],\n    });\n    console.log('Build succeeded:', result);\n  } catch (e) {\n    console.error('Build failed:', e.message);\n  }\n}\n\nbundle();","lang":"typescript","description":"Shows basic bundling and minification with esbuild's build API using async/await."},"warnings":[{"fix":"Use a version range like `^0.26.0` or `~0.26.0` in package.json, or pin to an exact version.","message":"In v0.27.0, esbuild introduced backwards-incompatible changes. Pin exact version to avoid unexpected upgrades.","severity":"breaking","affected_versions":">=0.27.0"},{"fix":"Ensure your CI/CD pipeline trusts the new publisher.","message":"In v0.26.0, esbuild enabled trusted publishing via GitHub Actions. If you rely on the old publishing method, update your workflows.","severity":"breaking","affected_versions":">=0.26.0"},{"fix":"Use `const esbuild = require('esbuild'); esbuild.build(...)` or switch to ESM imports.","message":"When using `require('esbuild')` in CommonJS, you must access `.build` etc. as properties; the default export is not a function.","severity":"gotcha","affected_versions":">=0.17.0"},{"fix":"Replace `startService` with direct calls to `build` and `transform`.","message":"The `startService` API is deprecated since v0.9.0 and removed in v0.13.0. Use `build` and `transform` directly.","severity":"deprecated","affected_versions":">=0.13.0"},{"fix":"Install only `esbuild` as a dependency; do not add platform-specific packages directly.","message":"Platform-specific binaries (e.g., esbuild-openbsd-64-for-imba) are automatically downloaded by the main esbuild package. Manual installation is not needed and can cause version mismatches.","severity":"gotcha","affected_versions":"*"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run `npm install esbuild` (or yarn/pnpm equivalent). Ensure your node version is >=12.","cause":"esbuild is not installed or the platform-specific binary is missing.","error":"Error: Cannot find module 'esbuild'"},{"fix":"Delete node_modules and reinstall. Use `npm install esbuild --save-dev` to install the correct binary automatically.","cause":"The installed platform-specific binary does not match the current OS/architecture.","error":"Error: The package 'esbuild' was built for a different platform."},{"fix":"If using CommonJS, use `const esbuild = require('esbuild'); esbuild.build(...)`. If using ESM, use `import { build } from 'esbuild'`.","cause":"Using `require('esbuild')` and calling `.build` directly without accessing the correct property in older versions.","error":"TypeError: esbuild.build is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}