Open
Description
Describe the bug
Running integration tests with @modelcontextprotocol/sdk
version 1.11.4 raises a runtime error:
SyntaxError: The requested module 'ajv' does not provide an export named 'Ajv'
Downgrading to 1.11.3 resolves the issue.
To Reproduce
Steps to reproduce the behavior:
- Clone https://github.com/alexander-zuev/kollektiv-mcp
pnpm remove @modelcontextprotocol/sdk
pnpm add @modelcontextprotocol/[email protected]
pnpm run test
Expected behavior
Integration tests should pass as they do with version 1.11.3.
Logs
FAIL integration tests/integration/index.test.ts [ tests/integration/index.test.ts ]
SyntaxError: The requested module 'ajv' does not provide an export named 'Ajv'
Test Files 1 failed | 15 passed (16)
Tests 109 passed (109)
Environment
- Cloudflare Worker
- Vitest test runner
- Node.js v23.6.0
- pnpm (latest)
Additional context
- No direct import of
ajv
in the project. - The SDK is used as a dependency; the error appears to be caused by an internal import or packaging change in 1.11.4.
- Pinning the SDK to 1.11.3 avoids the error.
Workaround
Pin @modelcontextprotocol/sdk
to version 1.11.3 in package.json
:
"@modelcontextprotocol/sdk": "1.11.3"
Please investigate if a packaging or ESM/CJS export change was introduced in 1.11.4 that affects ajv imports.