Registry / devops / esbuild-freebsd-64

esbuild-freebsd-64

JSON →
library0.15.18jsnpmunverified

esbuild-freebsd-64 is a specific platform binary package providing the core native module for esbuild on FreeBSD 64-bit systems. esbuild is a high-performance JavaScript bundler and minifier known for its exceptional speed. It processes JavaScript, TypeScript, JSX, TSX, CSS, and JSON, offering features like tree-shaking, minification, source map generation, and a powerful transformation API. While the main esbuild project is actively developed, with versions reaching up to `v0.28.x` (as of April 2026), this specific binary package (`esbuild-freebsd-64`) is at version `0.15.18`, corresponding to older `esbuild` releases. Users typically interact with the main `esbuild` package, which then selects and leverages the appropriate platform-specific binary, such as this one, as an optional dependency. Its primary differentiator is its build speed, making it suitable for development workflows where rapid rebuilds are critical, often outperforming other bundlers like Webpack or Rollup.

npm install esbuild-freebsd-64
INSTALL
IMPORT
SIG · ESBUILD-FREEBSD-64
E
esbuild-freebsd-64
devopsjavascriptv0.15.18
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

build
import { build } from 'esbuild'
const { build } = require('esbuild')
The 'esbuild-freebsd-64' package provides the native binary, but the public API is imported from the main 'esbuild' package. ESM is standard; CJS is also supported.
transform
import { transform } from 'esbuild'
import transform from 'esbuild/lib/transform'
For transforming individual code strings or buffers, use the named `transform` export. Avoid deep imports from `lib/` as they are internal and subject to change.
FormatMessagesOptions
import type { FormatMessagesOptions } from 'esbuild'
import { FormatMessagesOptions } from 'esbuild'
When importing types in TypeScript, use `import type` for clarity and to prevent runtime imports. This type is used with `formatMessages`.

This quickstart demonstrates how to use the esbuild `build` API to bundle a TypeScript file into an optimized ES module for Node.js, including minification and source maps.

import { build } from 'esbuild'; import path from 'path'; import fs from 'fs/promises'; const entryPoint = './src/index.ts'; const outputDir = './dist'; async function buildProject() { try { await fs.mkdir(outputDir, { recursive: true }); await fs.writeFile(path.join(path.dirname(entryPoint), path.basename(entryPoint)), ` console.log('Hello from esbuild!'); export const foo = 'bar'; `); const result = await build({ entryPoints: [entryPoint], bundle: true, outdir: outputDir, platform: 'node', target: 'es2020', minify: true, sourcemap: true, logLevel: 'info', format: 'esm', }); if (result.errors.length > 0) { console.error('Build failed with errors:', result.errors); } else { console.log('Build successful! Output in:', outputDir); const outputFile = path.join(outputDir, 'index.js'); const content = await fs.readFile(outputFile, 'utf-8'); console.log('\n--- Output Content (truncated) ---\n', content.substring(0, 200), '...'); } } catch (e) { console.error('An unexpected error occurred during build:', e); } } buildProject();
Debug
Known issues
breakingThe default value for the `target` option changed from `es2015` to `es2016` in esbuild v0.15.0. This might affect generated code compatibility for older environments if you rely on the default.
fix
Explicitly set `target: 'es2015'` in your esbuild configuration if you need to support environments that do not support ES2016 features.
affects: >=0.15.0
breakingThe default value for the `charset` option changed from `ascii` to `utf8` in esbuild v0.15.0. This can alter how non-ASCII characters are handled in output files, potentially causing issues with older systems or specific encoding expectations.
fix
If your project specifically requires ASCII output for character encoding, set `charset: 'ascii'` in your esbuild configuration.
affects: >=0.15.0
breakingThe `jsxFactory` and `jsxFragment` options now correctly accept empty string values starting from esbuild v0.15.0. If you previously relied on their incorrect handling of empty strings, your build behavior may change.
fix
Review your `jsxFactory` and `jsxFragment` settings. If an empty string was unintentionally ignored, confirm the new behavior aligns with your desired output.
affects: >=0.15.0
gotchaThe `esbuild-freebsd-64` package is a specific native binary for `esbuild`. While `esbuild` itself is at `v0.28.x`, this binary package is fixed at `v0.15.18`. For new projects, install the main `esbuild` package, which will automatically select the correct, up-to-date binary for your platform. Manually installing this specific binary is generally only needed for explicit version control or debugging platform-specific issues.
fix
For the latest esbuild features and bug fixes, install `esbuild` directly (`npm install esbuild`). If you must use a specific older version of `esbuild`, ensure the corresponding binary package version is compatible.
affects: <=0.15.18
Errors
Common errors & fixes
Error: Cannot find module 'esbuild/lib/main.js' or 'esbuild/lib/main.wasm' or 'esbuild/bin/esbuild'
This error often occurs when the native binary for esbuild (like esbuild-freebsd-64) fails to install correctly or is not found in the expected location, often due to npm permissions or environmental issues.
fix
Ensure `esbuild` and its platform-specific binaries are correctly installed by running `npm rebuild esbuild`. Check your npm cache and ensure sufficient permissions in your project directory. Sometimes, manually deleting `node_modules` and `package-lock.json` then reinstalling (`npm install`) can resolve this.
TypeError: esbuild.build is not a function
This typically happens when trying to use esbuild's API in a CommonJS environment without correctly importing it as an ESM module, or when a bundler is incorrectly processing esbuild itself.
fix
If in a CommonJS file, use `const esbuild = require('esbuild');` and then `esbuild.build(...)`. If using ESM, ensure `import { build } from 'esbuild';` is at the top of the file and your environment supports ESM.
ESBUILD_EXIT_CODE: 1
A generic exit code from esbuild indicating a build failure. This is often accompanied by more specific errors in the esbuild output regarding parsing, configuration, or file resolution.
fix
Examine the detailed error messages printed by esbuild in the console. These messages will point to the specific file, line, or configuration issue causing the build to fail. Increase `logLevel` to 'verbose' for more diagnostic output.
Upgrade
Version history
0.15.18latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
3 hits · last 30 days
node
2
Resources