Skip to content

ERROR mastra/mcp #3738

New issue

Have a question about this project? No Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “No Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? No Sign in to your account

Open
reactDJ opened this issue Apr 20, 2025 · 0 comments
Open

ERROR mastra/mcp #3738

reactDJ opened this issue Apr 20, 2025 · 0 comments
Assignees

Comments

@reactDJ
Copy link

reactDJ commented Apr 20, 2025

After installing 0.3.10 version
After importing import { MCPConfiguration } from "@mastra/mcp";

I have this error :

var exitHook = require('exit-hook');
Error [ERR_REQUIRE_ESM]: require() of ES Module backend/node_modules/@mastra/mcp/node_modules/exit-hook/index.js from backend/node_modules/@mastra/mcp/dist/index.cjs not supported.
Instead change the require of index.js in backend/node_modules/@mastra/mcp/dist/index.cjs to a dynamic import() which is available in all CommonJS modules.
at Object. (backend/node_modules/@mastra/mcp/dist/index.cjs:11:16) {
code: 'ERR_REQUIRE_ESM'
}

Node.js v20.10.0

I think exit-hook is now ESM since 4.0.0 version

No Sign up for free to join this conversation on GitHub. Already have an account? No Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants