Monopack

raw JSON →
0.2.6 verified Sat Apr 25 auth: no javascript abandoned

Version 0.2.6 (alpha). Monopack is a JavaScript bundler specifically for Node.js monorepo applications. It produces a static deterministic deliverable: a single main.js bundle of monorepo sources, a trimmed package.json and yarn.lock containing only used third-party dependencies, and a node_modules directory. It requires Node >= 6.14.4 and Yarn >= 1.3.2. Differentiators: focuses on monorepo workflows and CI/CD deterministic builds, bundles source but not third-party dependencies (copies them), and supports --with-extra-module for dynamic requires. Currently alpha quality, not under active development.

error Error: Cannot find module 'fs-extra'
cause fs-extra is a peer dependency not installed automatically.
fix
npm install fs-extra (or yarn add fs-extra) in your project.
error Error: command not found: monopack
cause Monopack not installed globally or locally.
fix
Install globally: npm install -g monopack, or use npx monopack.
error Yarn is required for deterministic dependencies collection
cause Monopack relies on yarn.lock and yarn CLI; without Yarn it issues a warning and may produce non-deterministic node_modules.
fix
Install Yarn: npm install -g yarn.
deprecated Project is in alpha and unmaintained since 2019. No npm updates after v0.2.6.
fix Consider alternatives like esbuild, webpack, or rollup with monorepo plugins.
gotcha Requires Yarn to be installed even if project uses npm; without Yarn, dependency collection may not be deterministic.
fix Install Yarn globally (npm install -g yarn) or the tool may produce non-deterministic output.
gotcha The build command creates a temporary output directory by default unless --out-dir is specified, which can cause confusion.
fix Always specify --out-dir to have a predictable output location.
gotcha --with-extra-module only accepts package name without version; using version string (e.g., mysql@2.16.0) will fail silently.
fix Use package name only: -m mysql, not -m mysql@2.16.0.
npm install monopack-config
yarn add monopack-config
pnpm add monopack-config

Shows global installation, build, run, and debug commands with common options.

npm install -g monopack
# or locally: npm install --save-dev monopack
# Build an application
monopack build src/main.js --out-dir ./dist
# Run the built application
monopack run src/main.js
# Debug with Node inspector (Node >= v8)
monopack debug src/main.js --debug-host-port 0.0.0.0:9229