-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
I tried to connect the MCP to Claude Code and it failed with ERR_MODULE_NOT_FOUND
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/path/to/node_modules/@cmd8/excalidraw-mcp/dist/tools/index' imported from /path/to/node_modules/@cmd8/excalidraw-mcp/dist/index.js
Probably the bug happened because of a mismatch between development tooling and Node.js runtime requirements
// This works in bundlers, fails in Node.js ESM:
import { foo } from './utils/helper'
// Node.js ESM requires:
import { foo } from './utils/helper.js'Root Cause
The package has an ESM configuration mismatch:
package.jsonhas"type": "module"(ESM mode)tsconfig.jsonuses"moduleResolution": "bundler"which allows extensionless
importstsccompiles the TypeScript without adding.jsextensions- Node.js ESM requires explicit
.jsextensions for relative imports
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels