Repository navigation
fix(install): install runtime dependencies only (--omit=dev) (#203) - #209
Open
MikeBishop wants to merge 1 commit into
Open
MikeBishop wants to merge 1 commit into
MikeBishop wants to merge 1 commit into
Conversation
The self-heal install in cli/install-runner.js ran a plain `npm install`, which also installs devDependencies (tsx, esbuild, vitest, typescript). The plugin runs the prebuilt dist/, so none of them are used at runtime. They add ~58 packages to every first-run install, and esbuild's own postinstall binary check can fail the whole install: on my machine it died with SIGSEGV and the runtime dependencies were never installed. Pass --omit=dev. A fresh checkout started through mcp-server-wrapper.js now installs 184 packages instead of 242, contains no dev tooling, and answers initialize and tools/list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4 tasks done
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.
Summary
The first-run self-heal install (
runNpmInstall()incli/install-runner.js) runs a plainnpm install, which also installs devDependencies:tsx,esbuild,vitest,typescriptand their dependencies. The plugin runs the prebuiltdist/, so none of them are used at runtime.They aren't just dead weight. On my machine, esbuild's postinstall (
tsx/node_modules/esbuild/bin/esbuild --version) died with SIGSEGV, failing the wholenpm install, so the runtime dependencies were never installed and the MCP server could never start. Details in #203.Fix
Pass
--omit=devto the install. One argument incli/install-runner.js, with a comment saying why. #195 already usesnpm ci --omit=devfor provisioning.This doesn't address #203's main point, moving the install out of the MCP handshake. That's a design decision about what the user sees in the meantime, and I've left it to you.
Test plan
test/mcp-install-runner.test.ts:runNpmInstall()spawnsnpm installwith--omit=devin the plugin root. It fails againstmain.npm test(full suite): 351/351 pass, 63 test files.node_modules) and startedcli/mcp-server-wrapper.jswith an MCPinitialize+tools/liston stdin. The wrapper detected the missing dependencies, installed 184 packages (242 without--omit=dev),scripts/postinstall.jspassed,node_modulesheld notsx/esbuild/vitest/typescript, and the server answered withsearchandread. Wall time was about 2.5 minutes either way; the large runtime packages dominate, so this is about reliability, not speed.Refs #203.
Drafted with AI assistance (Claude Code). I reviewed the change and ran the end-to-end install on my own machine.
🤖 Generated with Claude Code