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.

ERROR Only workspace's with version 2+ support project.json files

See original GitHub issue

Current Behavior

On running npx nx g @nrwl/workspace:convert-to-nx-project, I get this error - Only workspace’s with version 2+ support project.json files

Expected Behavior

It should create the per-project config. Is this a regression? - No

Steps to Reproduce

  1. Create an Nx 12.5 project with npx create-nx-workspace --preset=angular (uses npm, not yarn)
  2. Add 2 Angular apps - Shell & Feature
  3. Add module federation with @angular-architects/module-federation
  4. Run npx nx g @nrwl/workspace:convert-to-nx-project --project shell

You could try it on this example repo.

Failure Logs

ERROR Only workspace’s with version 2+ support project.json files.

Environment

Node : 14.17.1 OS : linux x64 npm : 6.14.13

nx : Not Found @nrwl/angular : 12.5.0 @nrwl/cli : 12.5.0 @nrwl/cypress : 12.5.0 @nrwl/devkit : 12.5.0 @nrwl/eslint-plugin-nx : 12.5.0 @nrwl/express : Not Found @nrwl/jest : 12.5.0 @nrwl/linter : 12.5.0 @nrwl/nest : Not Found @nrwl/next : Not Found @nrwl/node : Not Found @nrwl/react : Not Found @nrwl/schematics : Not Found @nrwl/tao : 12.5.0 @nrwl/web : Not Found @nrwl/workspace : 12.5.0 @nrwl/storybook : 12.5.0 @nrwl/gatsby : Not Found typescript : 4.2.4

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
tfalvocommented, Jun 30, 2021

oh… I renamed angular.json to workspace.json, as described in docs

Then changed version:1 to version:2 Then nx g @nrwl/workspace:convert-to-nx-project --all was working, and converted all projects. (press Enter without any name of project)

Each project configuration was moved to project.json with also new syntax (executors, generators…)

2reactions
yharaskrikcommented, Jun 30, 2021

Tacking on here (let me know if it should be it’s own issue) when using Angular.json and migrating apps to the new project.json format (after changing version in angular.json to 2) I get Unable to read workspace file 'angular.json': Invalid format version detected - Expected:[ 1 ] Found: [ 2 ]

Read more comments on GitHub >

github_iconTop Results From Across the Web

workspace.json with version 2 incompatible error · Issue #8018
Just trying arrange workspace.json file when upgrade my nx workspace with nx 13. When adding more projects, I got an error like below....
Read more >
package.json - npm Docs
This document is all you need to know about what's required in your package.json file. It must be actual JSON, not just a...
Read more >
Error: Local workspace file ('angular.json') could not be found ...
I was migrating from Angular version 5 to version 6. It came to my notice that angular 5 was using .angular-cli.json file whereas...
Read more >
JSON Files - Business Central - Microsoft Learn
When you start a new AL project, two JSON files; the app.json file and ... is only supported for Business Central version 14...
Read more >
Workspace and project file structure - Angular
Angular also supports workspaces with multiple projects. ... package-lock.json, Provides version information for all packages installed into node_modules by ...
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