{"id":10805,"library":"esbuild-linux-arm","title":"esbuild Linux ARM Binary","description":"This package, `esbuild-linux-arm`, is a platform-specific binary component for esbuild, an extremely fast JavaScript and CSS bundler and minifier. The main `esbuild` package (currently at v0.28.0) automatically installs the correct platform-specific binary, making this package an indirect dependency for most users. esbuild is renowned for its exceptional speed, often performing builds 10 to 100 times faster than alternatives like Webpack or Rollup, attributed to its implementation in Go, extensive parallelism, and optimized algorithms. It maintains a sustainable and active release cadence, with frequent updates addressing bugs, introducing new features, and incorporating JavaScript specification changes. Key differentiators include its high performance, minimal configuration, built-in support for TypeScript and JSX transformation, and a growing plugin ecosystem.","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-arm","lang":"bash","label":"npm"},{"cmd":"yarn add esbuild-linux-arm","lang":"bash","label":"yarn"},{"cmd":"pnpm add esbuild-linux-arm","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"While `require` works, esbuild encourages ESM for its API. The `build` function is the primary method for programmatically invoking esbuild. Asynchronous API is recommended, especially when using plugins.","wrong":"const { build } = require('esbuild')","symbol":"build","correct":"import { build } from 'esbuild'"},{"note":"The `transform` function is used for processing individual code strings rather than entire file bundles. It's a named export, not a property of a default export.","wrong":"import esbuild from 'esbuild'; esbuild.transform(...)","symbol":"transform","correct":"import { transform } from 'esbuild'"},{"note":"Type imports should use `import type` to ensure they are stripped during compilation and do not introduce runtime dependencies.","wrong":"import { ServeOptions } from 'esbuild'","symbol":"ServeOptions","correct":"import type { ServeOptions } from 'esbuild'"}],"quickstart":{"code":"import { build } from 'esbuild';\nimport path from 'path';\nimport url from 'url';\n\nconst __dirname = path.dirname(url.fileURLToPath(import.meta.url));\n\nasync function bundleCode() {\n  try {\n    await build({\n      entryPoints: [path.resolve(__dirname, 'src/index.ts')],\n      bundle: true,\n      minify: true,\n      sourcemap: true,\n      outfile: path.resolve(__dirname, 'dist/bundle.js'),\n      platform: 'node',\n      target: 'es2020',\n      logLevel: 'info',\n    });\n    console.log('Build successful: dist/bundle.js created.');\n  } catch (error) {\n    console.error('Build failed:', error);\n    process.exit(1);\n  }\n}\n\nbundleCode();\n\n// To make this runnable, create src/index.ts:\n// export function greet(name: string): string {\n//   return `Hello, ${name}!`;\n// }\n// console.log(greet('esbuild user'));","lang":"typescript","description":"This quickstart demonstrates how to programmatically use esbuild's `build` API to bundle, minify, and create a sourcemap for a TypeScript entry file, targeting a Node.js environment."},"warnings":[{"fix":"Update your `package.json` to use exact version pinning (e.g., `\"esbuild\": \"0.28.0\"`) or tilde ranges (e.g., `\"esbuild\": \"~0.28.0\"`) and thoroughly test before deploying.","message":"esbuild explicitly ships backwards-incompatible changes in minor versions (e.g., v0.27.0, v0.24.0, v0.23.0). It is crucial to pin exact versions or use only patch-level ranges (`~0.X.Y`) in `package.json` to prevent unexpected build failures upon upgrade.","severity":"breaking","affected_versions":">=0.17.0"},{"fix":"Always use `--platform=node` when bundling applications intended to run in a Node.js environment. For the JS API, set `platform: 'node'` in the build options.","message":"When bundling for Node.js, `esbuild` does not automatically externalize Node.js built-in modules (like `fs`, `path`, `https`) by default unless `--platform=node` is explicitly set. Without this, it will attempt to bundle them, leading to errors like 'Could not resolve \"https\"'.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Upgrade your Node.js runtime to version 18 or later. Node.js 18 is the oldest version currently supported by esbuild's JavaScript API.","message":"esbuild's JavaScript API increased its minimum required Node.js version from 12 to 18 in a 2024 release. Running `esbuild` via its JS API on older Node.js versions will result in incompatibility errors.","severity":"breaking","affected_versions":">=0.19.12 (versions published in 2024 and later)"},{"fix":"Run the TypeScript type checker (e.g., `tsc --noEmit`) alongside esbuild in your build pipeline. In `tsconfig.json`, set `\"compilerOptions\": { \"isolatedModules\": true }` to prevent features that rely on cross-file type references from mis-compiling.","message":"esbuild treats TypeScript types as comments and strips them without performing type checking. This means type errors will not halt the esbuild process. It is recommended to enable the `isolatedModules` TypeScript compiler option.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Review TypeScript code using parameter properties or class fields, especially when targeting older environments. Ensure `tsconfig.json`'s `target` and `useDefineForClassFields` options are correctly configured for your desired runtime behavior.","message":"The behavior of TypeScript parameter properties and class fields changed in v0.27.7, specifically regarding their lowering when the target environment does not support class fields. Previous versions might have incorrectly generated class fields, leading to runtime issues.","severity":"breaking","affected_versions":">=0.27.7"},{"fix":"Upgrade your macOS operating system to macOS 11 Big Sur or later to continue using recent esbuild versions.","message":"Support for macOS 10.15 Catalina was dropped in a 2024 release (v0.24.0) because the Go programming language (which esbuild is written in) dropped support for it. This affects users running older macOS versions.","severity":"breaking","affected_versions":">=0.24.0"}],"env_vars":null,"last_verified":"2026-04-19T00:00:00.000Z","next_check":"2026-07-18T00:00:00.000Z","problems":[{"fix":"Ensure the module is installed (`npm install some-module`), spelled correctly, and check your `resolve` options in esbuild configuration. If it's a Node.js built-in module, ensure `platform: 'node'` is set.","cause":"esbuild could not find the imported module in `node_modules` or the specified paths.","error":"✘ [ERROR] Could not resolve \"some-module\""},{"fix":"Review the file and line number indicated in the error message for incorrect syntax. Use a linter (like ESLint) to catch these errors before running esbuild.","cause":"There is a syntax error in your JavaScript or TypeScript code.","error":"✘ [ERROR] Expected \";\" but found \"}\""},{"fix":"Ensure `esbuild.stop()` is properly called and awaited, or investigate specific Deno runtime issues related to child process handling, especially after Deno 1.40.0.","cause":"This error can occur in Deno when esbuild's long-lived child process is not explicitly terminated after `esbuild.stop()` is called, particularly with Deno's testing API.","error":"error: Promise resolution is still pending but the event loop has already resolved"},{"fix":"Inspect the mentioned configuration file and its imports for syntax errors or accidental inclusion of browser-specific code. Refactor imports to be more granular, importing only what's strictly needed for the build environment.","cause":"Often seen in frameworks using esbuild internally (e.g., TinaCMS), this indicates a syntax/semantic error in the configuration file or an imported file, or attempting to run frontend-specific code (e.g., using `window`) in a Node.js environment during the build process.","error":"ERROR: your schema was not successfully built / ERROR: your config.{ts,js} was not successfully executed"}],"ecosystem":"npm"}