esbuild Linux ARM 64-bit Binary
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.
Common errors
-
✘ [ERROR] Could not resolve "some-module"
cause esbuild cannot find the specified module. This often happens if the module is not installed, misspelled, or if path resolution is misconfigured.fixVerify `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'`. -
✘ [ERROR] Expected ";" but found "}"
cause This is a general syntax error encountered by esbuild during parsing. It indicates malformed JavaScript or TypeScript code.fixReview 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. -
your config.{ts,js} was not successfully executedcause 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.fixEnsure 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. -
Top-level variables in an entry point module should never end up in the global scope when running esbuild's output in a browser.
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.fixWhen 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.
Warnings
- breaking 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.
- breaking 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.
- breaking 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.
- gotcha 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.
- gotcha 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.
- gotcha 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.
Install
-
npm install esbuild-linux-arm64 -
yarn add esbuild-linux-arm64 -
pnpm add esbuild-linux-arm64
Imports
- build
const esbuild = require('esbuild'); // CJS is supported, but ESM is generally preferred for modern Node.js development and type safety.import * as esbuild from 'esbuild'; await esbuild.build({ entryPoints: ['src/app.js'], bundle: true, outfile: 'dist/bundle.js', }); - Service
import { startService } from 'esbuild'; const service = await startService(); try { // Use service for operations } finally { service.stop(); } - transform
import { transform } from 'esbuild'; // Incorrect if 'transform' is not a named export directly from 'esbuild'.import * as esbuild from 'esbuild'; const result = await esbuild.transform('const a = 1;', { loader: 'js', minify: true, }); console.log(result.code);
Quickstart
import * as esbuild from 'esbuild';
import path from 'path';
import { fileURLToPath } from 'url';
// Emulate __dirname for ESM context
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const entryPoint = path.resolve(__dirname, 'src/index.ts');
const outputDir = path.resolve(__dirname, 'dist');
console.log(`Bundling ${entryPoint} to ${outputDir}/bundle.js`);
try {
await esbuild.build({
entryPoints: [entryPoint],
bundle: true,
minify: true,
sourcemap: true,
platform: 'node', // or 'browser' or 'neutral'
format: 'esm', // or 'cjs' or 'iife'
outfile: path.join(outputDir, 'bundle.js'),
// Externalize node built-ins for 'node' platform to avoid bundling them
external: ['fs', 'path', 'url'],
logLevel: 'info',
define: { 'process.env.NODE_ENV': '"production"' },
// Add a simple plugin example to show esbuild's extensibility
plugins: [{
name: 'log-plugin',
setup(build) {
build.onStart(() => {
console.log('Build started!');
});
build.onEnd(result => {
if (result.errors.length > 0) {
console.error('Build failed:', result.errors);
} else {
console.log('Build finished successfully with', result.warnings.length, 'warnings.');
}
});
},
}],
});
console.log('Build complete!');
} catch (e) {
console.error('Build failed:', e.message);
process.exit(1);
}