{"id":15430,"library":"esbuild-linux-arm64","title":"esbuild Linux ARM 64-bit Binary","description":"esbuild-linux-arm64 is a platform-specific binary distribution of esbuild, a high-performance JavaScript and CSS bundler and minifier written in Go. It provides the native executable for Linux ARM 64-bit systems, which the main `esbuild` package dynamically loads. As of early 2026, the `esbuild` project is on version 0.28.0 and maintains a sustainable release cadence, with frequent updates often occurring monthly or bi-monthly, and at least one release every three months. Its primary differentiator is its exceptional speed, often achieving 10-100x faster build times compared to traditional JavaScript bundlers like Webpack or Rollup, due to its native compilation. This makes it particularly effective for development environments requiring rapid feedback loops and for projects that prioritize build performance and modern JavaScript features with minimal configuration overhead. It excels at creating optimized bundles for web applications and npm packages.","status":"active","version":"0.15.18","language":"javascript","source_language":"en","source_url":"https://github.com/evanw/esbuild","tags":["javascript"],"install":[{"cmd":"npm install esbuild-linux-arm64","lang":"bash","label":"npm"},{"cmd":"yarn add esbuild-linux-arm64","lang":"bash","label":"yarn"},{"cmd":"pnpm add esbuild-linux-arm64","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"This package is a platform-specific binary dependency for the main 'esbuild' package, which orchestrates its use.","package":"esbuild","optional":false}],"imports":[{"note":"The primary API is the 'build' function, which returns a promise. Async/await is the recommended pattern. While CommonJS 'require' still works, ESM imports are standard for new projects.","wrong":"const esbuild = require('esbuild'); // CJS is supported, but ESM is generally preferred for modern Node.js development and type safety.","symbol":"build","correct":"import * as esbuild from 'esbuild';\n\nawait esbuild.build({\n  entryPoints: ['src/app.js'],\n  bundle: true,\n  outfile: 'dist/bundle.js',\n});"},{"note":"For long-running processes or multiple builds, starting a service can be more efficient than calling `build` directly multiple times, as it avoids repeated startup overhead.","symbol":"Service","correct":"import { startService } from 'esbuild';\n\nconst service = await startService();\ntry {\n  // Use service for operations\n} finally {\n  service.stop();\n}"},{"note":"The 'transform' API allows processing a single string of code rather than files, useful for in-memory transformations or plugin development. It's usually accessed as 'esbuild.transform'.","wrong":"import { transform } from 'esbuild'; // Incorrect if 'transform' is not a named export directly from 'esbuild'.","symbol":"transform","correct":"import * as esbuild from 'esbuild';\n\nconst result = await esbuild.transform('const a = 1;', {\n  loader: 'js',\n  minify: true,\n});\nconsole.log(result.code);"}],"quickstart":{"code":"import * as esbuild from 'esbuild';\nimport path from 'path';\nimport { fileURLToPath } from 'url';\n\n// Emulate __dirname for ESM context\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = path.dirname(__filename);\n\nconst entryPoint = path.resolve(__dirname, 'src/index.ts');\nconst outputDir = path.resolve(__dirname, 'dist');\n\nconsole.log(`Bundling ${entryPoint} to ${outputDir}/bundle.js`);\n\ntry {\n  await esbuild.build({\n    entryPoints: [entryPoint],\n    bundle: true,\n    minify: true,\n    sourcemap: true,\n    platform: 'node', // or 'browser' or 'neutral'\n    format: 'esm',   // or 'cjs' or 'iife'\n    outfile: path.join(outputDir, 'bundle.js'),\n    // Externalize node built-ins for 'node' platform to avoid bundling them\n    external: ['fs', 'path', 'url'], \n    logLevel: 'info',\n    define: { 'process.env.NODE_ENV': '\"production\"' },\n    // Add a simple plugin example to show esbuild's extensibility\n    plugins: [{\n      name: 'log-plugin',\n      setup(build) {\n        build.onStart(() => {\n          console.log('Build started!');\n        });\n        build.onEnd(result => {\n          if (result.errors.length > 0) {\n            console.error('Build failed:', result.errors);\n          } else {\n            console.log('Build finished successfully with', result.warnings.length, 'warnings.');\n          }\n        });\n      },\n    }],\n  });\n  console.log('Build complete!');\n} catch (e) {\n  console.error('Build failed:', e.message);\n  process.exit(1);\n}\n","lang":"typescript","description":"This quickstart demonstrates how to bundle a TypeScript entry point for a Node.js environment, including minification, sourcemaps, and a basic logging plugin, using esbuild's JavaScript API."},"warnings":[{"fix":"Pin the exact version of `esbuild` in `package.json` (e.g., `\"esbuild\": \"0.28.0\"`) or use a version range that only accepts patch upgrades (`^0.28.0` or `~0.28.0`) to avoid unexpected breaking changes.","message":"esbuild's `0.x.x` versioning scheme (e.g., v0.27.0, v0.28.0) does not follow strict semantic versioning where minor versions only introduce compatible changes. Minor version increments in esbuild can and often do contain backwards-incompatible changes.","severity":"breaking","affected_versions":">=0.17.0"},{"fix":"Ensure your project's Node.js environment is version 18 or later. Update your `engines` field in `package.json` to reflect this requirement.","message":"The minimum required Node.js version for esbuild's JavaScript API increased to Node 18 due to an incompatibility with the `esbuild-wasm` package and older Node versions. Using older Node versions will lead to runtime errors.","severity":"breaking","affected_versions":">=0.23.0"},{"fix":"Review your esbuild installation and build processes, especially in environments with strict network policies or custom binary management, to ensure compatibility with the new integrity checks. Upgrade to Go 1.26 or newer for underlying Go compiler changes if encountering issues.","message":"esbuild v0.28.0 introduced integrity checks to the fallback download path for platform-specific binaries. While this improves security, it was deemed a breaking change due to potential subtle behavior differences, especially in complex installation scenarios or restricted environments.","severity":"breaking","affected_versions":">=0.28.0"},{"fix":"Add `platform: 'node'` and include an `external: ['module-name']` array in your `esbuild` configuration to prevent bundling Node.js native modules. Alternatively, use `packages: 'external'` in the CLI or API options for all modules.","message":"When bundling for the `node` platform, esbuild by default *bundles* Node.js built-in modules. If you intend for Node.js built-in modules (like `fs`, `path`, `http`) to be resolved at runtime by Node.js, they must be explicitly marked as external.","severity":"gotcha","affected_versions":"All versions"},{"fix":"If experiencing unusual behavior after an esbuild upgrade involving a Go compiler update, review the official Go release notes for the new version. Test thoroughly and consider isolating esbuild versions if critical stability is required.","message":"Updates to the underlying Go compiler (e.g., from Go 1.25.7 to 1.26.1 in esbuild v0.28.0) can subtly change esbuild's behavior in edge cases. This might affect garbage collection, stack allocation, or executable formats, leading to unexpected runtime characteristics.","severity":"gotcha","affected_versions":">=0.28.0 (and other versions with Go compiler upgrades)"},{"fix":"For versions that re-enabled the feature, configure `--serve=local.example.com:8000` to specify the allowed domain. If on an affected version, upgrade esbuild or avoid custom hostname mappings with `--serve`.","message":"Using esbuild's development server (`--serve`) in conjunction with custom hostname mappings (e.g., via `/etc/hosts`) was intentionally broken in v0.25.0 for security reasons and re-enabled as an opt-in feature in later versions for a single domain name.","severity":"gotcha","affected_versions":"0.25.0 - 0.27.x"}],"env_vars":null,"last_verified":"2026-04-21T00:00:00.000Z","next_check":"2026-07-20T00:00:00.000Z","problems":[{"fix":"Verify `some-module` is correctly installed in `node_modules` and its name is correctly spelled. Check `tsconfig.json` paths or `esbuild` `resolveExtensions` options. For Node.js built-in modules in a browser target, use `external` or set `platform: 'node'`.","cause":"esbuild cannot find the specified module. This often happens if the module is not installed, misspelled, or if path resolution is misconfigured.","error":"✘ [ERROR] Could not resolve \"some-module\""},{"fix":"Review the file and line number indicated in the error message. Ensure your code adheres to correct syntax. Use linters (e.g., ESLint, Prettier) to catch syntax issues pre-build.","cause":"This is a general syntax error encountered by esbuild during parsing. It indicates malformed JavaScript or TypeScript code.","error":"✘ [ERROR] Expected \";\" but found \"}\""},{"fix":"Ensure your esbuild configuration file and any modules it imports are compatible with a Node.js runtime. Avoid importing browser-specific APIs or components. Refactor imports to be more granular if a specific part of a module causes issues.","cause":"This error, common in frameworks using esbuild for configuration files (e.g., TinaCMS), means the configuration file compiled but failed to execute, often due to importing frontend-specific code (e.g., `window`, DOM APIs) or code requiring special loaders/plugins in a Node.js execution environment.","error":"your config.{ts,js} was not successfully executed"},{"fix":"When targeting a browser, always use `--format=iife` (Immediately Invoked Function Expression) with `<script src=\"...\">` or `--format=esm` for `<script type=\"module\" src=\"...\">`. This ensures proper module scoping and prevents global variable collisions.","cause":"This is not an error message but a common misconception/issue. If your bundled code's top-level variables become global in a browser, it means you're not using an appropriate output format.","error":"Top-level variables in an entry point module should never end up in the global scope when running esbuild's output in a browser."}],"ecosystem":"npm"}