Bugfix: Why did mcp-gograb-ai crash with ERR_MODULE_NOT_FOUND for @l...
Documentation for Sessions
🐛 Bugfix: Why did mcp-gograb-ai crash with ERR_MODULE_NOT_FOUND for @l...
Date: 2026-02-21
Time: 14:01:28 UTC
Session: gspace1-131.6
Agent: architecture
Confidence: 9800%
Status: ✅ Documented
📋 Decision Context
Question:
Why did mcp-gograb-ai crash with ERR_MODULE_NOT_FOUND for @libs-foundational/connectivity-core on Node 24?
Task: Not specified
🎯 Decision Made
Chosen:
Fix start-server.sh CWD + type:module + export type (correct fix)
Options Considered:
- Rewrite imports with wildcard * as pattern (wrong layer)
- Fix start-server.sh CWD + type:module + export type (correct fix)
- Remove connectivity-core dependency entirely (overkill)
💭 Reasoning
Two independent root causes: (1) tsx resolves tsconfig paths based on CWD not entry file. start-server.sh ran tsx from workspace root where tsconfig path mappings are not resolved. Fix: cd SCRIPT_DIR before exec tsx. (2) connectivity-core package.json had no type field defaulting to CJS. Node 24 strict ESM wraps CJS as single default export breaking named imports. Adding type:module plus separating export type for interfaces fixed it. Previous agent tested only with Node 22 from inside MCP directory the one config where neither bug manifests.
📁 Files Involved
- No files specified
🔗 Related
- Decision ID:
dev_1771682488268_9lys5hz - Session: 131
- Workspace: gspace1
Auto-generated by MCP Smart Consolidation