nx has hard dependency on * version of @nrwl/cli
See original GitHub issueCurrent Behavior
CI builds are failing with error
ERROR As of Nx 13, project configuration should be moved from nx.json to workspace.json/project.json. Please run “nx format” to fix this.
Expected Behavior
We have nx pinned to exact version 12.7.2, so we should not see a failure referencing a newer version.
Steps to Reproduce
The nx package.json contains
"dependencies": {
"@nrwl/cli": "*"
}
which would explain the version mismatch.
Failure Logs
21-Oct-2021 09:47:28 > nx affected --target=lint --parallel --maxParallel=4
21-Oct-2021 09:47:29 > NX NOTE Affected criteria defaulted to --base=develop --head=HEAD
21-Oct-2021 09:47:29 ERROR As of Nx 13, project configuration should be moved from nx.json to workspace.json/project.json. Please run "nx format" to fix this.
Environment
NX Report complete - copy this into the issue template
Node : 14.17.4 OS : darwin x64 npm : 7.20.5
nx : 12.7.2 @nrwl/angular : Not Found @nrwl/cli : 13.0.1 @nrwl/cypress : Not Found @nrwl/devkit : 13.0.1 @nrwl/eslint-plugin-nx : Not Found @nrwl/express : Not Found @nrwl/jest : 13.0.1 @nrwl/linter : 13.0.1 @nrwl/nest : Not Found @nrwl/next : Not Found @nrwl/node : Not Found @nrwl/nx-cloud : Not Found @nrwl/react : Not Found @nrwl/schematics : Not Found @nrwl/tao : 13.0.1 @nrwl/web : Not Found @nrwl/workspace : 13.0.1 @nrwl/storybook : Not Found @nrwl/gatsby : Not Found typescript : 4.4.2
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (3 by maintainers)

Top Related StackOverflow Question
In my case nx displays the following command:
and suggests running
nx format. But, after runningnx format- you cyclically get the same error “As of Nx 13, project configuration should be moved from nx.json to workspace.json/project.json. Please run “nx format” to fix this”.You can solve this by opening
nx.jsonfile from the workspace root, and removing theprojectsobject:"defaultProject": "web-client", "projects": { /* remove this object */ "nativescript-mobile": { "tags": [] } }then, run
nx format, and then run your nx command. This solved this issue for me (I was running commandnpx nx run nativescript-mobile:ios). Worked in my case. Hope this helps.We have since fixed this dependency. Can you all open a new issue about any formatting issues you might have?
https://unpkg.com/nx@14.6.3/package.json