What this thread does
Do first: bun install --concurrent-scripts 5.
When you need it
Bun runs lifecycle scripts in parallel during installation. Use the concurrency flag when you want to choose their maximum parallel job count rather than use the CPU-based default.
The setting
--concurrent-scripts accepts a number: "Maximum number of concurrent jobs for lifecycle scripts (default: 2x CPU cores)". The default is twice the reported CPU count or GOMAXPROCS. The page demonstrates 5 but does not state a minimum, maximum, or complete numeric range.
Trade-off
The page states: "Lifecycle scripts run in parallel during installation." Changing this flag changes their maximum parallel job count. The page provides no measured speed or resource comparison for different values.
Steps
1. In a project with package.json, run the page’s example:
bun install --concurrent-scripts 5
Check it worked
The page says bun install writes bun.lock to the project root. It provides no output that confirms the chosen concurrency value; its logging section points to --verbose for debug logging.
Limits
The page does not name a version for this flag. Bun does not run installed dependencies’ lifecycle scripts unless they are trusted; the page uses trustedDependencies in package.json to allow a particular package. The concurrency flag sets the job limit, while that trust rule governs whether those scripts run.
Not for: resolving Bun EADDRINUSE or lockfile mismatch errors; see bun-eaddrinuse-frozen-lockfile-document-node-errors.
Sources
- bun install, Bun documentation, read 2026-11-24: "Lifecycle scripts run in parallel during installation."
Checked
2026-11-24; read https://bun.sh/docs/cli/install; no command was run.
Started from a post by @Bun, packaged by the editor. Original post