Repository navigation
Remove unused BB Office development dependencies - #2
Merged
Merged
Conversation
ymichael
added a commit
to get-bb/bb
that referenced
this pull request
Sep 11, 2026
…esolver fix (#3529) ## Human comments ## What was wrong BB delegated plugin installation to whichever npm was on the server's PATH. npm 10.9.8 reproducibly crashes installing the original BB Office 1.0.0 with `Cannot read properties of null (reading 'edgesOut')`. The crash reproduces outside BB with just `{"name":"repro","version":"1.0.0","devDependencies":{"vitest":"4.1.11"}}` and `npm install --ignore-scripts --omit=dev --omit=optional --no-audit --no-fund`. It also reproduces without `--omit=dev`; having development dependencies is not itself an error. Tracing Arborist shows Vitest 4.1.11 → Vite 8.3.0 → optional @vitejs/devtools 0.7.3 → optional @vitejs/devtools-vitest 0.7.3 → Vitest 5.0.0. Resolving the circular peer set replaces the Vitest 5 node with Vitest 4, but npm 10.9.8 continues traversing the detached node and dereferences its null parent. This is fixed upstream by npm/cli#8448. Adding only that upstream parent guard in a process-local diagnostic hook makes the minimal reproduction pass; npm 11.16.0 also passes unchanged. Separately, an intentionally restricted-PATH experiment confirmed that no npm executable means every Git install reaching the npm step fails. Ayu succeeded normally and failed only in that artificial environment. This is not an Ayu bug, and neither result has been attributed to the original reporting user's incident without their full error and environment. ## What changed Ship pinned npm 11.16.0, containing the upstream resolver fix, and invoke its CLI through BB's running Node executable for plugin dependency installation and build-tool downloads. This makes the npm version deterministic and removes the external-npm prerequisite. Keep normal npm `--omit=dev --omit=optional --ignore-scripts` behavior. Plugin manifests and development dependency declarations are not rewritten. Show installation errors persistently in the dialog, and update CLI/skill/configuration guidance. UI, SDK, and CLI installs and updates share these server paths. No server/daemon wire contract changed. Office's independent unused-dependency cleanup is ymichael/bb-plugins#2 and is not required for this fix. ## How you verified - Minimal standalone Vitest 4.1.11 reproduction: npm 10.9.8 fails; the same npm with only the upstream parent guard succeeds; npm 11.16.0 succeeds. TypeScript-only devDependencies and Vitest 5.0.0 succeed on npm 10.9.8 as controls. - Original Office 1.0.0 (b2a8da0c497b9d63d525b061e2d22829686a9c57), with its complete original devDependencies: exact BB npm command succeeds with npm 11.16.0, installing one runtime package. Removing Office's unused dependencies alone still crashes on npm 10.9.8. - Built and packed the revised BB app into a fresh prefix and launched with a fresh store. Clicked Install BB Office in the actual catalog UI: original Office 1.0.0 reached `running`, remained enabled after reload, and its installed manifest matched the original Git bytes with all 25 devDependencies intact. First-use toolchain download and frontend/server builds succeeded using shipped npm 11.16.0. - Turbo build/typecheck passed for server, plugin-build, and bb-app with their dependencies. - Server installer tests: 60 passed, including real shipped-npm invocation, intact development dependency declarations, disabled lifecycle scripts, and empty PATH. Build-toolchain tests: 5 passed, one opt-in network test skipped. > AGENT GENERATED
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
BB Office declares 16 development dependencies that its source and tests do not use. Remove ten Radix component packages, @pierre/diffs, class-variance-authority, clsx, sonner, tailwind-merge, and vaul, and prune their lockfile entries.
Keep the remaining development dependencies in the plugin package. The final diff changes only
plugins/bb-office/package.jsonandpnpm-lock.yaml; there is no repository restructuring or version bump. Plugin installation reliability is handled separately in get-bb/bb#3529. This cleanup is not required for that BB fix to install the original Office release.Verification: after restoring the standard plugin development dependency layout,
corepack pnpm install --ignore-scriptsandcorepack pnpm exec turbo run build test typecheck --forcepassed: all three tasks and 81 tests.git diff --checkpassed.