Conversation
✅ Deploy Preview for nx-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for nx-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
View your CI Pipeline Execution ↗ for commit 39fe324
☁️ Nx Cloud last updated this comment at |
There was a problem hiding this comment.
Important
At least one additional CI pipeline execution has run since the conclusion below was written and it may no longer be applicable.
Nx Cloud is proposing a fix for your failed CI:
We update updateNxVersions to also bump eslint to ^9.0.0 whenever @nx/eslint is present in the template, preventing the npm ERESOLVE peer-dependency conflict that arises when @nx/eslint@24 (which requires ESLint 9+) is pinned into a template that still declares eslint@~8.57.0. The fix introduces an optional peerDependencyOverrides parameter to updateNxVersionsInContent/updateNxVersions and passes { eslint: eslintVersion } from create-workspace.ts so that only templates using @nx/eslint are affected.
Note
⏳ We are verifying this fix by re-running e2e-workspace-create:e2e-ci--src/create-nx-workspace-base-templates.test.ts.
Warning
The suggested diff is too large to display here, but you can view it on Nx Cloud ↗
Or Apply changes locally with:
npx nx-cloud apply-locally JCHS-5kJ0
Apply fix locally with your editor ↗ View interactive diff ↗
🎓 Learn more about Self-Healing CI on nx.dev
Current Behavior
npx create-nx-workspace@22.7.6 my-workspace --preset=empty --no-interactiveproduces a workspace pinned to the latest Nx release (currently 23.0.1) instead of 22.7.6. Presets likeemptyare remapped to GitHub templates (nrwl/empty-template), and the template flow clones the template repo's default branch HEAD withgit clone --depth 1. The template repos always track the latest Nx release and have no version tags, so the version ofcreate-nx-workspacethe user invokes never influences the resulting workspace's Nx version. Users deliberately staying on an older major silently get the newest one.Expected Behavior
The workspace is created with the Nx version matching the invoked
create-nx-workspaceversion. After cloning a template and before installing dependencies,nxand all@nx/*entries in the template's root package.json are rewritten to the running CLI'snxVersion. All Nx packages publish in lockstep, so a single version string is correct for all of them; the nested package.json files in the template repos declare no Nx dependencies, so a root-only rewrite is sufficient. Forcreate-nx-workspace@latestthis is a no-op since the template already pins the same version.Related Issue(s)
Fixes #36190
View session information ↗