{"id":15431,"library":"esbuild-android-arm64","title":"esbuild Android ARM 64-bit Binary","description":"This package provides the pre-compiled Android ARM 64-bit binary for esbuild, a high-performance JavaScript bundler and minifier. It is primarily consumed as an optional platform-specific dependency by the main `esbuild` npm package, which automatically selects and utilizes the appropriate binary for the host system. The overarching `esbuild` project is actively maintained with frequent releases, often including multiple patch versions per month and minor versions every few months, ensuring rapid bug fixes and feature enhancements. It is renowned for its exceptional speed, achieved by being written in Go and compiling to native code, distinguishing it significantly from JavaScript-based bundlers such as Webpack or Rollup. The current stable version for the main `esbuild` project is 0.28.0. This specific package, `esbuild-android-arm64`, does not expose any direct JavaScript API; its sole purpose is to supply the underlying executable for environments targeting Android ARM 64-bit architectures.","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-android-arm64","lang":"bash","label":"npm"},{"cmd":"yarn add esbuild-android-arm64","lang":"bash","label":"yarn"},{"cmd":"pnpm add esbuild-android-arm64","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"This package (`esbuild-android-arm64`) provides a platform-specific binary and does not expose direct JavaScript imports. The `build` function is imported from the main `esbuild` package. The `esbuild` API is primarily designed for ESM; while CommonJS `require` may work for older versions or specific setups, ESM is the recommended approach for modern Node.js and TypeScript projects. Type definitions are shipped with the package.","wrong":"const { build } = require('esbuild')","symbol":"build","correct":"import { build } from 'esbuild'"},{"note":"The `transform` function is imported from the main `esbuild` package and is used for single-file transformations without bundling. Same ESM/CJS considerations as `build` apply.","wrong":"const transform = require('esbuild').transform","symbol":"transform","correct":"import { transform } from 'esbuild'"},{"note":"The `Plugin` interface is imported from the main `esbuild` package. It is used for type hinting when creating custom esbuild plugins and is not a runtime value. Use `import type` for type-only imports in TypeScript to avoid bundling unused imports.","wrong":"import { Plugin } from 'esbuild'","symbol":"Plugin","correct":"import type { Plugin } from 'esbuild'"}],"quickstart":{"code":"import { build } from 'esbuild';\nimport path from 'path';\nimport process from 'process';\n\n// Define your entry point and output file paths\nconst entryPoint = path.resolve(process.cwd(), 'src/index.ts');\nconst outFile = path.resolve(process.cwd(), 'dist/bundle.js');\n\nasync function runBuild() {\n  try {\n    // Configure and run the esbuild bundling process\n    await build({\n      entryPoints: [entryPoint],\n      bundle: true, // Enable bundling\n      outfile: outFile, // Specify the output file\n      platform: 'node', // Target Node.js environment\n      format: 'esm', // Output ES Module format\n      sourcemap: true, // Generate source maps\n      minify: true, // Enable minification\n      target: ['es2020', 'node18'], // Target JavaScript and Node.js versions\n      define: { 'process.env.NODE_ENV': '\"production\"' }, // Define global variables\n      plugins: [\n        // Example of a simple esbuild plugin logging build events\n        {\n          name: 'my-build-logger',\n          setup(build) {\n            build.onStart(() => {\n              console.log('esbuild process started...');\n            });\n            build.onEnd(result => {\n              if (result.errors.length > 0) {\n                console.error('esbuild finished with errors:', result.errors);\n              } else {\n                console.log('esbuild finished successfully!');\n              }\n            });\n          }\n        }\n      ]\n    });\n    console.log(`Application bundled to ${outFile}`);\n  } catch (error) {\n    console.error('esbuild failed during build:', error);\n    process.exit(1);\n  }\n}\n\nrunBuild();","lang":"typescript","description":"This quickstart demonstrates a basic esbuild configuration to bundle a TypeScript application, including generating source maps, minifying code, targeting specific environments, and incorporating a simple custom plugin for build lifecycle logging. This code leverages the main `esbuild` package, which utilizes this binary."},"warnings":[{"fix":"Pin `esbuild` to an exact version (`\"esbuild\": \"0.x.y\"`) or use `\"esbuild\": \"~0.x.y\"` to limit updates to patch releases.","message":"esbuild `v0.27.0` introduced deliberate backwards-incompatible changes. Relying on caret (`^`) or tilde (`~`) ranges for `esbuild` may lead to unexpected behavior. It is strongly recommended to pin the exact version (`0.x.y`) in `package.json` or use `~0.x.y` to limit updates to patch releases.","severity":"breaking","affected_versions":">=0.27.0"},{"fix":"Upgrade `esbuild` to `v0.27.7` or later if using TypeScript parameter properties with targets that don't support class fields.","message":"In esbuild `v0.27.6`, TypeScript parameter properties were incorrectly generated as class fields even when the configured target environment did not support them, potentially leading to runtime errors in older environments. This was fixed in `v0.27.7`.","severity":"gotcha","affected_versions":"0.27.6"},{"fix":"Upgrade `esbuild` to `v0.27.4` or later to resolve issues with CSS media query handling.","message":"esbuild versions `0.25.11` through `0.27.3` introduced regressions in parsing and minifying specific CSS media query syntaxes (e.g., `<media-type> and <media-condition-without-or>`). This could lead to incorrect output or failed minification.","severity":"gotcha","affected_versions":"0.25.11 - 0.27.3"},{"fix":"Upgrade `esbuild` to `v0.27.1` or later to ensure correct `var` hoisting behavior in complex ES module `require` scenarios.","message":"esbuild versions prior to `v0.27.1` had a bug where `var` declarations nested inside `if` statements in ES modules imported via `require` (which are wrapped) might not be hoisted correctly, leading to runtime errors.","severity":"gotcha","affected_versions":"<0.27.1"},{"fix":"No direct fix needed by consumers, but awareness of the publishing mechanism is beneficial for supply chain security audits.","message":"As of `v0.26.0`, esbuild packages are published using GitHub's trusted publishing. While this enhances supply chain security by leveraging automated workflows for package publication, it represents a change in the distribution mechanism.","severity":"gotcha","affected_versions":">=0.26.0"}],"env_vars":null,"last_verified":"2026-04-21T00:00:00.000Z","next_check":"2026-07-20T00:00:00.000Z","problems":[{"fix":"Ensure the correct `esbuild` binary package (e.g., `esbuild-linux-x64`, `esbuild-win32-x64`) is installed for your specific host or target environment. If cross-compiling or deploying to Android ARM 64-bit, ensure the `esbuild-android-arm64` package is correctly installed and accessible by the main `esbuild` package.","cause":"The esbuild core package could not locate a compatible pre-built binary for the current platform/architecture, or the `esbuild-android-arm64` package was installed on an incompatible system.","error":"Error: No matching binary found for esbuild-android-arm64."},{"fix":"Configure your `package.json` with `\"type\": \"module\"` to enable ES modules, or rename your file to `.mjs`. Alternatively, if you must use CommonJS, use dynamic `import('esbuild').then(...)` or ensure you're using an `esbuild` version and API call that supports CommonJS `require` where applicable.","cause":"Attempting to use ES module `import` syntax in a CommonJS (`require`) environment without proper configuration (e.g., `\"type\": \"module\"` in `package.json`).","error":"SyntaxError: Cannot use import statement outside a module"}],"ecosystem":"npm"}