Registry / devops / esbuild-sunos-64

esbuild-sunos-64

JSON →
library0.15.18jsnpmunverified

This package provides the `illumos 64-bit` native executable for esbuild, a high-performance JavaScript bundler and minifier. Esbuild, currently at version `0.28.0` as of early April 2026, is renowned for its exceptional speed, largely due to its implementation in Go, making it significantly faster than bundlers written in JavaScript. It offers capabilities for bundling JavaScript, TypeScript, JSX, TSX, CSS, and image files, supporting both ESM and CommonJS formats. The project maintains a rapid release cadence, with frequent patch updates and minor versions typically released every few months, addressing bugs, introducing new features, and enhancing performance. It differentiates itself through its aggressive performance focus, minimal configuration, and robust support for modern web technologies.

npm install esbuild-sunos-64
INSTALL
IMPORT
SIG · ESBUILD-SUNOS-64
E
esbuild-sunos-64
devopsjavascriptv0.15.18
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
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 18–226 runs
build_error
glibc
node 18–226 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')
ESM imports are preferred for esbuild's JavaScript API. While CommonJS `require` can be used, type declarations and tooling are optimized for `import` statements.
transform
✓ import { transform } from 'esbuild'
✗ import esbuild from 'esbuild'; esbuild.transform(...)
The `transform` function is a named export for programmatic code transformation without file system access. Default imports are not typically used for the main esbuild API.
BuildOptions
✓ import type { BuildOptions } from 'esbuild'
✗ import { BuildOptions } from 'esbuild'
When using TypeScript, always use `import type` for type-only imports like `BuildOptions` to ensure they are stripped from the compiled output, preventing runtime errors or unnecessary code.

Demonstrates a basic esbuild setup to bundle a TypeScript file into a single JavaScript output, including minification, sourcemaps, and targeting a browser environment. This script also creates and cleans up temporary input files for a self-contained example.

import { build } from 'esbuild'; import path from 'path'; import fs from 'fs'; // Ensure output directory exists const outputDir = path.join(process.cwd(), 'dist'); fs.mkdirSync(outputDir, { recursive: true }); // Create a dummy input file for demonstration const inputFilePath = path.join(process.cwd(), 'src', 'index.ts'); fs.mkdirSync(path.dirname(inputFilePath), { recursive: true }); fs.writeFileSync(inputFilePath, ` console.log('Hello from esbuild!'); const message: string = 'This is a TypeScript example.'; console.log(message); async function fetchData() { // In a real browser environment, fetch works. For Node.js, you might need a polyfill or specific 'platform' target. // This example assumes a context where fetch is available or externalized. // const response = await fetch('https://api.example.com/data'); // const data = await response.json(); return { example: 'data' }; } fetchData().then(data => console.log('Fetched data:', data)).catch(console.error); `, 'utf8'); async function runBuild() { try { await build({ entryPoints: [inputFilePath], bundle: true, outfile: path.join(outputDir, 'bundle.js'), platform: 'browser', // Target browser environment target: 'es2020', minify: true, sourcemap: true, logLevel: 'info' }); console.log('Build successful! Output in dist/bundle.js'); console.log('Content of bundle.js:\n' + fs.readFileSync(path.join(outputDir, 'bundle.js'), 'utf8')); // Clean up dummy files/folders fs.unlinkSync(inputFilePath); fs.rmdirSync(path.dirname(inputFilePath)); } catch (e) { console.error('Build failed:', e); process.exit(1); } } runBuild();
esbuild --version
Debug
Known issues
breakingEsbuild releases, especially prior to a 1.0.0 stable version, can contain deliberate backwards-incompatible changes, often incrementing the minor version (`0.x.0` to `0.y.0`). Users are strongly advised to pin the exact version of `esbuild` in `package.json` (e.g., `"esbuild": "0.28.0"`) or use patch-only version ranges like `~0.28.0` to avoid unexpected breakage from minor version updates.
fix
Update your `package.json` to pin the exact esbuild version or use a `~` semver range. Always review the changelog for specific breaking changes when upgrading, particularly across minor versions.
affects: >=0.17.0
gotchaBy default, esbuild does not bundle `node_modules` dependencies for Node.js targets, treating them as external. This can lead to runtime 'module not found' errors if you expect external dependencies to be included in your bundle. For browser environments, these typically need to be bundled.
fix
To bundle node_modules dependencies, explicitly remove them from the `external` option. For Node.js targets, `external: ['*']` is often appropriate to prevent bundling all external packages and relying on Node.js's module resolution.
affects: >=0.1.0
gotchaEsbuild requires explicit 'loaders' for file types it doesn't recognize by default (e.g., `.css` for bundling directly, `.png`, `.svg` for file assets). Without a configured loader, it will report 'No loader is configured for...' and fail to process these files.
fix
Configure appropriate loaders in your esbuild build options. For example, `{ loader: { '.css': 'css', '.png': 'file' } }` for CSS and image files, or use plugins designed to handle specific asset types.
affects: >=0.1.0
deprecatedThe `startService` API, previously used for programmatic control over the esbuild daemon, has been deprecated. Direct use of `build` and `transform` functions is now the recommended approach, as they internally manage the service lifecycle more efficiently.
fix
Migrate away from `startService`. Directly call `build` or `transform` functions. If you need to customize the esbuild binary path, use the `ESBUILD_BINARY_PATH` environment variable or the `esbuild.config` option in some frameworks.
affects: >=0.15.0
gotchaA security vulnerability (CVE-2024–23334) affecting esbuild versions 0.24.2 and earlier allows malicious websites to send requests to a local development server and read responses, potentially exposing sensitive information. This is particularly relevant when using esbuild's development server.
fix
Upgrade esbuild to version 0.25.0 or later immediately. If using esbuild indirectly (e.g., via Angular), utilize package `overrides` or `resolutions` to enforce the secure version. Always verify the fix with `npm audit`.
affects: <0.25.0
Errors
Common errors & fixes
No loader is configured for ".css" files: /path/to/style.css
Esbuild encountered a file type (like `.css`, `.png`, `.svg`) for which no specific loader is configured in the build options.
fix
Add a `loader` configuration to your build options for the problematic file type, e.g., `{ loader: { '.css': 'css', '.png': 'file' } }` for CSS files, or `'file'` for assets.
Could not resolve "my-npm-package" (use "--log-limit=0" to disable this message)
Esbuild cannot find the specified module. This often happens when a `node_modules` dependency is expected to be bundled but is treated as external, or the import path is incorrect.
fix
Ensure the module is installed. If it's a `node_modules` dependency, either explicitly include it in your bundle by removing it from the `external` option or, for Node.js targets, ensure it's correctly externalized (`external: ['*']`). Verify the import path is correct and consider `platform: 'node'` if bundling for Node.js.
Syntax error: Expected ":" but found "!"
The JavaScript syntax used is not supported by the configured target environment (e.g., using newer ECMAScript features with an older `target` setting), or there's a fundamental syntax error in the code.
fix
Adjust your `target` option in esbuild to a newer ECMAScript version (e.g., `es2020`, `esnext`, `es2023`). Review the specified file and line number to correct any syntax mistakes.
Error [ERR_REQUIRE_ESM]: require() of ES Module (...) from (...) not supported. Instead change the require of (...) in (...) to a dynamic import() which is available in all CommonJS modules.
This runtime error occurs when a CommonJS module attempts to `require()` an ES Module, which Node.js does not directly support. This is a common interop issue when bundling for Node.js with mixed module formats.
fix
When bundling for Node.js (`platform: 'node'`), prioritize `format: 'cjs'` or carefully manage external ESM dependencies. If `format: 'esm'` is used, CJS dependencies might need to be explicitly bundled or dynamic `import()` used instead of `require()`. Review esbuild's `--format` and `--packages` options in conjunction with your dependencies.
Upgrade
Version history
0.15.18latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
esbuild-sunos-64 — npm install esbuild-sunos-64 · libregistry