ERROR Only workspace's with version 2+ support project.json files
See original GitHub issueCurrent 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
- Create an Nx 12.5 project with
npx create-nx-workspace --preset=angular
(uses npm, not yarn) - Add 2 Angular apps - Shell & Feature
- Add module federation with @angular-architects/module-federation
- 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:
- Created 2 years ago
- Comments:9 (2 by maintainers)
oh… I renamed
angular.json
toworkspace.json
, as described in docsThen changed
version:1
toversion:2
Thennx 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…)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 inangular.json
to 2) I getUnable to read workspace file 'angular.json': Invalid format version detected - Expected:[ 1 ] Found: [ 2 ]