Skip to content

Commit eb397c1

Browse files
mlab817claude
andcommitted
fix: resolve MCP server startup crash on macOS (issue #46)
- 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>
1 parent df3cb37 commit eb397c1

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

packaging/npm/bin/cli.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ async function main() {
8484
const localBinaryPath = getLocalBinaryPath();
8585

8686
// Try to use existing native binary
87-
if (localBinaryPath && fs.existsSync(localBinaryPath)) {
87+
if (localBinaryPath && fs.existsSync(localBinaryPath) && fs.statSync(localBinaryPath).size > 0) {
8888
// Always ensure the execute bit is set before spawning.
8989
// postinstall chmodSync can silently fail on some npm configurations
9090
// (e.g. restricted sandbox, npm run as root on certain macOS setups),

packaging/npm/dart/bin/server.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
import 'package:flutter_skill/src/cli/server.dart';
1+
import 'package:flutter_skill_npm/src/cli/server.dart';
22

33
void main(List<String> args) => runServer(args);

0 commit comments

Comments
 (0)