Skip to content

Inaccurate version support description in README #241

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

Closed
alanag13 opened this issue May 13, 2025 · 2 comments
Closed

Inaccurate version support description in README #241

alanag13 opened this issue May 13, 2025 · 2 comments
Assignees

Comments

@alanag13
Copy link

The README states that node v20 and up are supported, but attempting to run with node v20.2.0 produces:

file:///Users/redacted/.npm/_npx/191c568aa03d4fb8/node_modules/mongodb-mcp-server/dist/helpers/packageInfo.js:1
import packageJson from "../../package.json" with { type: "json" };
                                             ^^^^

SyntaxError: Unexpected token 'with'
    at DefaultModuleLoader.moduleStrategy (node:internal/modules/esm/translators:116:18)
    at DefaultModuleLoader.moduleProvider (node:internal/modules/esm/loader:206:14)

All works as expected on newer versions of node.

@wtrocki wtrocki self-assigned this May 14, 2025
@wtrocki
Copy link
Collaborator

wtrocki commented May 14, 2025

The error you're encountering is related to the JSON imports with the with assertion syntax, which was introduced in Node.js v20.10.0. Updating package.json and README.md

@gagik
Copy link
Collaborator

gagik commented May 14, 2025

Thank you for raising this. Solved with #246

@gagik gagik closed this as completed May 14, 2025
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

No branches or pull requests

3 participants