fix: resolve MCP server startup crash on macOS (issue #46)#51
Open
mlab817 wants to merge 1 commit into
Open
Conversation
- Skip 0-byte cached binaries in cli.js by adding fs.statSync size check to prevent spawn ENOEXEC when a corrupted/incomplete download is cached - Fix Dart fallback import in dart/bin/server.dart to use the correct local package name flutter_skill_npm (matches dart/pubspec.yaml) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
Fixes #46 — MCP server fails to start on macOS v0.9.36.
Two root causes identified and fixed (as described in this comment):
spawn ENOEXECfrom zero-byte cached binary —packaging/npm/bin/cli.jsonly checked if the binary file existed, not whether it had content. A failed/interrupted download leaves a 0-byte file that passes the existence check but crashes on execution. Addedfs.statSync(localBinaryPath).size > 0to the guard.packaging/npm/dart/bin/server.dartimportedpackage:flutter_skill/...butdart/pubspec.yamldeclares the package asflutter_skill_npm. Updated the import to match.Test plan
~/.flutter-skillto clear any cached binary, restart the MCP server — it should fall back to Dart and start successfully~/.flutter-skill/bin/is skipped and re-downloaded rather than executed🤖 Generated with Claude Code