You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
➜ cosmo-demo git:(main) ✗ nvm use 20.9.0
Now using node v20.9.0 (npm v10.1.0)
➜ cosmo-demo git:(main) ✗ cd router
➜ router git:(main) ✗ wgc router compose --input graph.localhost.yaml --out config.json
Error:
file:///home/sudheesh/.nvm/versions/node/v20.9.0/lib/node_modules/wgc/dist/src/core/config.js:5
import info from '../../package.json' with { type: 'json' };
^^^^
SyntaxError: Unexpected token 'with'
at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:118:18)
at callTranslator (node:internal/modules/esm/loader:273:14)
at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:278:30)
Node.js v20.9.0
I was initially using Node.js v20.9.0 LTS, which satisfies the currently documented requirement of >= 20 LTS. However, this version caused the above command to fail due to compatibility issues. The issue was resolved after upgrading to Node.js v22.11.0 LTS.
Additionally, upon further investigation, I noticed that the main cosmo repo (wundergraph/cosmo) explicitly declares the following in its package.json:
"engines": {
"node": ">=22.11.0",
"pnpm": "9"
},
This further confirms that Node.js v22.11.0 is the actual minimum version required for proper functionality.
Proposed Fix:
Update the Node.js requirement in the tutorial documentation to reflect the actual minimum version:
Current: >= 20 LTS
Proposed: >= 22.11.0 LTS
This clarification will help avoid confusion and prevent runtime errors for users following the guide.
Context:
I encountered this issue while setting up the related project: wundergraph/cosmo-demo. I’ll be raising a PR to update the documentation accordingly.
The text was updated successfully, but these errors were encountered:
raosudheesh
pushed a commit
to raosudheesh/cosmo-docs
that referenced
this issue
May 8, 2025
raosudheesh
changed the title
Update the node version mention in tutorial/from-zero-to-federation-in-5-steps-using-cosmo from ">= 20 LTS" to ">= 20.11.0 LTS"
Update the node version mention in tutorial/from-zero-to-federation-in-5-steps-using-cosmo from ">= 20 LTS" to ">= 22.11.0 LTS"
May 8, 2025
raosudheesh
pushed a commit
to raosudheesh/cosmo-docs
that referenced
this issue
May 8, 2025
Title:
Update the Node.js version mentioned in tutorial/from-zero-to-federation-in-5-steps-using-cosmo from ">= 20 LTS" to ">= 22.11.0 LTS"
Description:
While following the tutorial from-zero-to-federation-in-5-steps-using-cosmo, when running the command:
I encountered following error:
I was initially using Node.js v20.9.0 LTS, which satisfies the currently documented requirement of >= 20 LTS. However, this version caused the above command to fail due to compatibility issues. The issue was resolved after upgrading to Node.js v22.11.0 LTS.
Additionally, upon further investigation, I noticed that the main cosmo repo (wundergraph/cosmo) explicitly declares the following in its package.json:
This further confirms that Node.js v22.11.0 is the actual minimum version required for proper functionality.
Proposed Fix:
Update the Node.js requirement in the tutorial documentation to reflect the actual minimum version:
Current: >= 20 LTS
Proposed: >= 22.11.0 LTS
This clarification will help avoid confusion and prevent runtime errors for users following the guide.
Context:
I encountered this issue while setting up the related project: wundergraph/cosmo-demo. I’ll be raising a PR to update the documentation accordingly.
The text was updated successfully, but these errors were encountered: