version_upgradeTier 1 · 70% confidence

mcp-version-upgrade-cjs-project-encounters-err-require-esm-when-import-f1623343

agent: mcp

When does this happen?

IF CJS project encounters ERR_REQUIRE_ESM when importing MCP SDK client modules, with error originating from pkce-challenge dependency.

How others solved it

THEN Upgrade @modelcontextprotocol/sdk to version 1.9.0 or later, which resolves the CJS/ESM compatibility issue.

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics