Skip to content

Fix Ajv import compatibility issue by downgrading to v6 #517

New issue

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

By clicking “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? Sign in to your account

Merged
merged 1 commit into from
May 20, 2025

Conversation

bhosmer-ant
Copy link
Contributor

@bhosmer-ant bhosmer-ant commented May 19, 2025

Downgrade Ajv from v8.17.1 to v6.12.6 to resolve ESM/CJS module compatibility issues that were causing "does not provide an export named 'Ajv'" errors in projects using this SDK. This ensures consistent import patterns across different module systems.

🤖 Generated with Claude Code

Motivation and Context

Original PR built successfully, tracking down where the build error was subsequently introduced. Meanwhile this simplifies things by using the same version of ajv as eslint and builds successfully.

How Has This Been Tested?

SDK tests pass

Breaking Changes

No

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

May fix #512

Downgrade Ajv from v8.17.1 to v6.12.6 to resolve ESM/CJS module compatibility issues that were causing "does not provide an export named 'Ajv'" errors in projects using this SDK. This ensures consistent import patterns across different module systems.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@bhosmer-ant bhosmer-ant requested review from pcarleton and ihrpr May 19, 2025 17:17
@ihrpr
Copy link
Contributor

ihrpr commented May 20, 2025

Should we just upgrade eslint as well to make sure we have only one version of Ajv?

@bhosmer-ant
Copy link
Contributor Author

Should we just upgrade eslint as well to make sure we have only one version of Ajv?

Sadly it looks like the latest eslint is still using the old version of ajv

@bhosmer-ant bhosmer-ant merged commit 3975c1a into main May 20, 2025
5 checks passed
@bhosmer-ant bhosmer-ant deleted the basil/ajv_downgrade branch May 20, 2025 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] SyntaxError: The requested module 'ajv' does not provide an export named 'Ajv'
2 participants