Registry / devops / monopack-builder

monopack-builder

JSON →
library0.2.6jsnpmunverified

A JavaScript bundler for Node.js monorepo applications (v0.2.6, alpha quality). It bundles a single main.js from monorepo sources, produces a minimal package.json and yarn.lock for only used third-party dependencies, and installs them. Built on webpack with deterministic builds. Different from general bundlers (e.g., webpack, rollup) by focusing on monorepo workflow and offline deployment. Alpha stage with limited features and support for Node.js >=6.14.4 and Yarn >=1.3.2. Low release cadence (no updates since v0.2.1).

npm install monopack-builder
INSTALL
IMPORT
SIG · MONOPACK-BUILDER
M
monopack-builder
devopsjavascriptv0.2.6
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.

monopack
monopack build main.js
monopack build --entry main.js
CLI tool; used globally or via npm/yarn scripts. The main file is positional, not a flag.
default
import monopack from 'monopack'
const monopack = require('monopack')
ESM-only since v0.2.0. CJS require will fail.
Command
monopack build main.js
monopack --build main.js
Commands are positional: build, run, debug. Options after command.

Installs monopack, creates a simple entry file, builds it to a directory, and runs the output bundle.

// Install locally npm install --save-dev monopack // Create a simple main.js entrypoint console.log('Hello from monorepo!'); // Run build npx monopack build main.js --out-dir ./dist // Output includes: dist/main.js, dist/package.json, dist/yarn.lock, dist/node_modules // Run the built app node dist/main.js
monopack --version
Debug
Known issues
gotchaYarn is required even if your project uses npm. Dependencies collection is deterministic only with Yarn.
fix
Install Yarn globally or ensure it's available in PATH.
affects: >=0.1.0
gotchaThe --out-dir option defaults to a temporary directory; explicitly set it to avoid loss of output.
fix
Use --out-dir ./dist or -d ./dist.
affects: >=0.1.0
gotchaDynamic requires (e.g., require(variable)) are not detected; use --with-extra-module to include them.
fix
Add -m <package> for each dynamically required dependency.
affects: >=0.1.0
gotchaThe bundle includes only sources from the monorepo. Third-party dependencies are installed separately, not bundled.
fix
Ensure third-party packages are in your monorepo's package.json.
affects: >=0.1.0
Errors
Common errors & fixes
Error: Cannot find module 'monopack'
Package not installed or used without npx/npm script.
fix
Install: npm install --save-dev monopack and use: npx monopack or ./node_modules/.bin/monopack
Error: The value of --out-dir must be a directory
--out-dir used with a file path instead of directory.
fix
Provide a directory: --out-dir ./dist
Error: Unknown command: --build
Option placed before command or wrong syntax.
fix
Use correct syntax: monopack build main.js
Upgrade
Version history
0.2.6latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
monopack-builder — npm install monopack-builder · libregistry