question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

nx has hard dependency on * version of @nrwl/cli

See original GitHub issue

Current 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:open
  • Created 2 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

38reactions
ihazarcommented, Dec 11, 2021

In my case nx displays the following command:

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.

and suggests running nx format. But, after running nx 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.json file from the workspace root, and removing the projects object:

"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 command npx nx run nativescript-mobile:ios). Worked in my case. Hope this helps.

0reactions
FrozenPandazcommented, Nov 21, 2022

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

nrwl-nx/community - Gitter
Just checked my nx version and i'm at 9.0.4 . Just saw that there's an update to ... /usr/local/lib/node_modules/@nrwl/cli/bin/nx.js at Function.Module.
Read more >
Automate Updating Dependencies - Nx
The installed dependencies are updated including the package.json (and node_modules ). The source code in the repo is updated to match the new...
Read more >
Effective React Development with Nx
npm install -g @nrwl/cli. Check that installation has worked by issuing the command nx --version. Now you will be able to run Nx...
Read more >
@webundsoehne/nx-builders - npm package | Snyk
This custom TypeScript compiler has additional properties to the generic one that can hard-swap TypeScript paths automatically and designating implicit ...
Read more >
tenant47 - NPM Package Overview - Socket - Socket.dev
Start using Socket to analyze tenant47 and its 20 dependencies to secure your ... Run npm install -g @nrwl/cli@13.4.1 to install nx library....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found