Update 12 -> 13 fails with error, doesn't allow migration
See original GitHub issueCurrent Behavior
Was on Nx 12
Expected Behavior
Upgrade to Nx 13 Should work out of box as far as I can tell from release notes and https://blog.nrwl.io/core-performance-improvements-webpack-5-react-native-and-more-in-nx-13-cfe63c7415f1
Steps to Reproduce
After upgrade, I tried a build and got:
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.
also tried:
nx g @nrwl/workspace:convert-to-nx-project --all
and got the same.
Running nx:format
gives:
Error: Cannot find module 'prettier'
Require stack:
- node_modules/@nrwl/workspace/src/command-line/format.js
- node_modules/@nrwl/workspace/src/command-line/nx-commands.js
- node_modules/@nrwl/cli/lib/init-local.js
- node_modules/@nrwl/cli/bin/nx.js
I wonder if this relates to #7421 as I’m using Yarn
Failure Logs
Environment
Node : 16.6.1 OS : linux x64 yarn : 1.22.11
nx : 13.0.1 @nrwl/angular : Not Found @nrwl/cli : 13.0.1 @nrwl/cypress : 13.0.1 @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 : 12.5.1 @nrwl/react : 13.0.1 @nrwl/schematics : Not Found @nrwl/tao : 13.0.1 @nrwl/web : 13.0.1 @nrwl/workspace : 13.0.1 @nrwl/storybook : 13.0.1 @nrwl/gatsby : Not Found typescript : 4.3.5
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:8
I managed to solve it: Delete the projects entry in
nx.json
, runnx format
andnx migrate --run-migrations
as mentioned in cli instructions.@ngfelixl I had the same issue. Fixed by manual creating workspace.json and moving “projects” property from nx.json to workspace.json https://nx.dev/l/a/core-concepts/configuration