{"id":18579,"library":"monopack-process","title":"Monopack","description":"Monopack is a JavaScript bundler designed for Node.js monorepo applications, currently in alpha (v0.2.6). It produces a single deterministic deliverable bundle (main.js), along with a filtered package.json, yarn.lock, and node_modules containing only used third-party dependencies. It targets developers using monorepos (e.g., Lerna) and CI/CD pipelines. Unlike generic bundlers like Webpack, Monopack specifically focuses on Node.js environments and deterministic builds. Release cadence is low; the project appears to be in early alpha with no recent major updates.","status":"active","version":"0.2.6","language":"javascript","source_language":"en","source_url":"https://github.com/flegall/monopack","tags":["javascript"],"install":[{"cmd":"npm install monopack-process","lang":"bash","label":"npm"},{"cmd":"yarn add monopack-process","lang":"bash","label":"yarn"},{"cmd":"pnpm add monopack-process","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required for deterministic package installation and lockfile generation","package":"yarn","optional":true}],"imports":[{"note":"Monopack is a CLI tool; there is no programmatic API. Use global or local installation as described.","wrong":"node monopack build main","symbol":"monopack (CLI)","correct":"monopack build main"},{"note":"The package may not expose a default export; avoid ESM import if using CommonJS.","wrong":"import monopack from 'monopack';","symbol":"monopack (require)","correct":"const monopack = require('monopack');"},{"note":"Provide the entry file with extension (main.js) to avoid ambiguous resolution.","wrong":"monopack build main","symbol":"build command","correct":"monopack build main.js"}],"quickstart":{"code":"// Install globally: npm install -g monopack\nmkdir my-monorepo-app && cd my-monorepo-app\n# Assumes a monorepo with a main.js entry\nmonopack build main.js --out-dir ./dist\n# Output: dist/main.js, dist/package.json, dist/yarn.lock, dist/node_modules\n# To run immediately:\nmonopack run main.js","lang":"javascript","description":"Global installation, building a monorepo app entry point to a dist directory, and running it."},"warnings":[{"fix":"Use at your own risk; pin to a specific version and test thoroughly.","message":"Alpha quality: the tool is in early alpha; may have bugs, breaking changes, or incomplete features.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Install Yarn: npm install -g yarn","message":"Yarn required for deterministic builds: even though the project may use npm, Yarn must be installed globally for dependency installation.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Use --with-extra-module flag to manually include dynamic dependencies, e.g., monopack build main.js -m mysql","message":"Only detects static imports; dynamic require() dependencies may be missed, leading to runtime errors.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Upgrade Node.js to at least v6.14.4.","message":"Node.js >=6.14.4 required; older versions not supported.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Ensure yarn.lock or package-lock.json exists in the monorepo root.","message":"Lockfile must be present in project root for deterministic dependency collection.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Install monopack: npm install -g monopack (global) or npm install --save-dev monopack (local then npx monopack)","cause":"Monopack is not installed locally or globally.","error":"Error: Cannot find module 'monopack'"},{"fix":"Install Yarn globally: npm install -g yarn","cause":"Yarn is required for post-build installation but not found in PATH.","error":"Error: Yarn must be installed to proceed."},{"fix":"Use the --with-extra-module option to manually add the dynamic dependency, e.g., monopack build main.js -m <package-name>","cause":"Monopack encountered a dynamic require() that it cannot resolve; dependency may be missing in the final bundle.","error":"Error: Dynamic require detected: ..."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}