Skip to content

bb.app 0.43.0: bundled npm missing 58/65 dependencies, breaks plugin update #3581

Closed

Description

@rabbive

Description

bb plugin update <id> fails for git-sourced plugins that require npm install (e.g. cloud-sandbox), because the npm CLI bundled inside bb.app is missing most of its own dependencies.

Steps to reproduce

  1. Install bb.app 0.43.0 on macOS.
  2. Run bb plugin update <git-sourced-plugin-id> --yes for a plugin that needs npm install.

Error

update refused: npm install failed (exit 7): ... at Object.<anonymous> (/Applications/bb.app/Contents/Resources/app.asar.unpacked/node_modules/npm/lib/cli/exit-handler.js:1:31) { code: 'MODULE_NOT_FOUND', requireStack: [ '.../npm/lib/cli/exit-handler.js', '.../npm/lib/cli/entry.js', '.../npm/lib/cli.js', '.../npm/bin/npm-cli.js' ] } Node.js v24.15.0

Root cause

Checked app.asar.unpacked/node_modules/npm/package.json's dependencies against what's actually present in app.asar.unpacked/node_modules/. Of npm's 65 declared dependencies, 58 are absent from the bundle (@npmcli/arborist, @npmcli/redact, cacache, pacote, tar, glob, chalk, etc. — full list available on request). Only 7 happened to be present, which is why the CLI got as far as loading npm-cli.js before failing on the first missing transitive require.

This is a packaging issue on bb's release build for 0.43.0, not user-side corruption — reinstalling bb.app from scratch reproduces the exact same missing set.

Workaround used

Manually npm install-ed the 58 missing top-level deps (151 packages incl. transitives) into a scratch dir and copied them into app.asar.unpacked/node_modules/. This fixed the immediate npm install failure and the plugin update succeeded. This is a local, throwaway fix that will be wiped by the next real bb.app update — the actual fix needs to happen in the release packaging step so the bundled npm ships complete.

Environment

  • bb-app: 0.43.0
  • OS: macOS (Darwin 27.0.0)
  • Node: v24.15.0 (Electron-bundled)

Activity

  1. added theissue type on Sep 12, 2026
  2. added
    desktop
    plugins
    confirmed-repro
    on Sep 12, 2026
  3. bb-slop-cop commented on Sep 12, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    Bug · High priority · Medium effort — desktop, plugins, confirmed-repro.

    Reproduction and root-cause report: REPRODUCED, high confidence, on trusted main 31d1771b9 in two clean checkouts; both source builds passed.

    The pnpm collector omits npm’s bundled dependencies, and the package copier excludes nested node_modules. Running npm from the selected package files exits 7 with missing proc-log; source npm succeeds. Current main lacks 60 of 65 top-level dependencies. The signed release’s exact count and a real plugin update were not tested. Related: #3566.

    No PR: the root-cause fix requires packaging changes, which this rule excludes from simple fixes.

    AGENT GENERATED

  4. added a commit that references this issue on Sep 12, 2026
    9a68828
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-reprodesktopplugins

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions