esbuild Windows 32-bit Binary
esbuild-windows-32 is a platform-specific package containing the Windows 32-bit executable for esbuild. Esbuild is an extremely fast, modern JavaScript and CSS bundler and minifier written in Go. Its primary differentiator is its exceptional speed, often performing 10-100 times faster than traditional bundlers like Webpack or Rollup, attributed to its native Go implementation, heavy use of parallelism, and optimized memory access patterns. The current stable version of the core `esbuild` package is `0.28.0`, released in early April 2026. The project maintains a sustainable and active release cadence, with new versions typically published at least once every three months, reflecting ongoing development and improvements. Key features include built-in support for JavaScript, TypeScript, JSX, and CSS, comprehensive bundling of ESM and CommonJS modules, aggressive tree-shaking and minification, source map generation, a straightforward API for CLI, JavaScript, and Go, and a flexible plugin system. It's widely adopted and integrated into tools like Vite, Angular (v17+), and Ruby on Rails (v7+). This `esbuild-windows-32` package is an optional dependency for the main `esbuild` package, automatically installed by npm based on the detected operating system and architecture.
Common errors
-
Error: EACCES: permission denied, unlink 'node_modules/esbuild/bin/esbuild'
cause Insufficient permissions to delete or modify the esbuild binary during installation or update, often on Windows systems or due to global npm cache issues.fixTry running `npm cache clean --force` and then `npm install esbuild` again. On Windows, ensure your terminal is running with administrator privileges, or try deleting `node_modules` and `package-lock.json` before reinstalling. -
esbuild: command not found
cause The esbuild binary was not correctly installed, or its path is not in your system's PATH environment variable, or npm's `postinstall` script failed to link it properly.fixEnsure `esbuild` is listed in your `package.json` and try `npm install` again. If the issue persists, check npm logs for `postinstall` script failures or manually verify the binary exists in `node_modules/esbuild/bin/esbuild`. -
The esbuild JavaScript API is not supported on node versions < 18.0.0
cause You are attempting to use a recent version of `esbuild` with an outdated Node.js environment.fixUpgrade your Node.js runtime to version 18.0.0 or higher. You can use tools like `nvm` (Node Version Manager) to easily switch Node.js versions. -
Error: Could not resolve "./my-module" (use "--bundle" to enable this)
cause You are trying to import a module that esbuild cannot find in standalone transformation mode. The error explicitly indicates that bundling is required for module resolution.fixAdd the `bundle: true` option to your esbuild configuration or `--bundle` flag if using the CLI, to enable esbuild's module resolution and bundling capabilities. -
SyntaxError: Cannot use import statement outside a module
cause This error typically occurs when a JavaScript file using ESM `import`/`export` syntax is being run in a CommonJS context (e.g., a `.js` file without `"type": "module"` in `package.json`, or an older Node.js version).fixEnsure your project's `package.json` includes `"type": "module"` for ESM files, or explicitly name your ESM files with a `.mjs` extension. Alternatively, configure esbuild's `format` option (e.g., `format: 'cjs'`) to output CommonJS compatible code.
Warnings
- breaking Esbuild releases frequently include backwards-incompatible changes. It is highly recommended to pin the exact version of `esbuild` in `package.json` (e.g., `"esbuild": "0.28.0"`) or use a caret range that only accepts patch upgrades (e.g., `^0.28.0`) to avoid unexpected breakages, especially for major/minor version bumps.
- breaking Starting with versions released in 2024 (roughly `v0.24.0` and above), `esbuild` increased its minimum required Node.js version for its JavaScript API from Node 12 to Node 18. Running `esbuild` on older Node.js versions will result in errors due to an incompatibility with Go-generated JavaScript for the `esbuild-wasm` package.
- breaking Esbuild v0.27.0 introduced deliberate backwards-incompatible changes, including conditional use of `Uint8Array.fromBase64` if available, with a fallback. This might cause subtle behavioral differences in environments where this function's availability varies.
- breaking Esbuild v0.28.0 introduced integrity checks for fallback binary downloads and updated the Go compiler. While the Go compiler update is not expected to cause issues, it could potentially affect edge cases. The integrity checks are a security improvement.
- gotcha When `esbuild` generates build metadata (metafiles), large JSON output can hit V8's implementation-specific maximum string length limit, causing `JSON.parse` to fail when accessing the metafile object via the JavaScript API.
Install
-
npm install esbuild-windows-32 -
yarn add esbuild-windows-32 -
pnpm add esbuild-windows-32
Imports
- build
const esbuild = require('esbuild'); esbuild.build(...)import { build } from 'esbuild' - context
import esbuild from 'esbuild'; esbuild.context(...)
import { context } from 'esbuild' - transform
require('esbuild').transformSync(...)import { transform } from 'esbuild'
Quickstart
import { build } from 'esbuild';
import path from 'path';
const projectRoot = process.cwd();
const entryPoint = path.join(projectRoot, 'src', 'index.ts');
const outputDir = path.join(projectRoot, 'dist');
async function bundleApp() {
try {
await build({
entryPoints: [entryPoint],
bundle: true,
minify: true,
sourcemap: true,
platform: 'node',
format: 'esm',
outdir: outputDir,
target: ['node18', 'es2022'],
define: { 'process.env.NODE_ENV': '"production"' },
logLevel: 'info',
});
console.log('Build successful!');
} catch (error) {
console.error('Build failed:', error);
process.exit(1);
}
}
bundleApp();