Projects broken after migrating to latest (14.1.4) and running migrations
See original GitHub issueEdit: Actually it seems like the issue is that nx migrate latest
does not update @nrwl/cli
so you end up with a cli in your project that doesn’t understand the new project.json
files.
Edit2: Even with that updated it fails which turns out to be an issue with the @nrwl/remix
module which hangs onto its own nx cli (v13) as a dependency and the call to remix setup node
calls nx cli v13 which chokes on the v14 style project.json without "root"s
Current Behavior
I updated from 14.0.2 to 14.1.4 via the nx migrate latest command and then ran the migrations via nx migrate --run-migrations. The migration removed the “root” key out of all of my project.json files and now my builds fail because the root key is missing from my project.json (???) same effect as this: https://github.com/nrwl/nx/issues/8968
Expected Behavior
This migration should probably just not exist? Why are root keys deleted if they are required?
Steps to Reproduce
Create a project using nx 14.0.2, migrate to 14.1.4 and try to run a nx command.
Failure Logs
npm ERR! path /home/circleci/project/node_modules/@nrwl/cli/node_modules/nx npm ERR! command failed npm ERR! command sh -c node ./bin/init npm ERR! > NX Cannot read properties of undefined (reading ‘endsWith’)
npm ERR! A complete log of this run can be found in: npm ERR! /home/circleci/.npm/_logs/2022-05-09T15_39_55_576Z-debug-0.log
Exited with code exit status 1
Environment
Node : 16.13.0 OS : darwin arm64 npm : 8.8.0
nx : 14.1.4 @nrwl/angular : 14.1.4 @nrwl/cypress : 14.1.4 @nrwl/detox : Not Found @nrwl/devkit : 14.1.4 @nrwl/eslint-plugin-nx : 14.1.4 @nrwl/express : 14.1.4 @nrwl/jest : 14.1.4 @nrwl/js : 14.1.4 @nrwl/linter : 14.1.4 @nrwl/nest : Not Found @nrwl/next : Not Found @nrwl/node : 14.1.4 @nrwl/nx-cloud : 14.0.3 @nrwl/nx-plugin : Not Found @nrwl/react : Not Found @nrwl/react-native : Not Found @nrwl/schematics : Not Found @nrwl/storybook : 14.1.4 @nrwl/web : Not Found @nrwl/workspace : 14.1.4 typescript : 4.6.3 rxjs : 6.6.7
Community plugins: @fortawesome/angular-fontawesome: 0.10.2 @nrwl/remix: 13.7.1 @nxext/stencil: 14.0.2 angular-calendar: 0.29.0 @trumbitta/nx-plugin-unused-deps: 1.10.0
Issue Analytics
- State:
- Created a year ago
- Comments:5
@mandaputtra yes, I solved it by adding overrides to my package.json to force @nrwl/remix to use 14.1.4
@joeflateau Thanks! Your solution helped me, haven’t known if we could override npm deps. I’m having problem with
nx-flutter
.