nx: Migrating to 14.5.1 failing due to `@angular/cli`
Current Behavior
When migrating a project from nx 14.1.4 to 14.5.1, I’m getting the following error
ERROR Failed to run update-tsconfig-target from @angular/cli. This workspace is NOT up to date!
> NX Path "/tsconfig.json" does not exist.
To workaround the issue I had to remove @angular/cli altogether from the repo. I’m assuming it might be ok as long as we only use the nx cli and stop using the ng cli, but it does seem a bit hacky. Although I can’t remember if Nx added the @angular/cli dependency itself in the first place or if we added it ourselves, so maybe it’s fine not having it around anymore.
Expected Behavior
Migration should complete without error.
Steps to Reproduce
I wish I knew for sure, I don’t have any custom stuff in the repo so I wanna believe any migration from 14.1.4 to 14.5.1, for a repo carrying at least one angular project (from 13.3 to 14.1), would prompt the error.
Failure Logs
This is the migration block causing the issue:
{
"version": "14.0.0",
"factory": "./update-14/update-tsconfig-target",
"description": "Update TypeScript compilation target to 'ES2020'.",
"package": "@angular/cli",
"name": "update-tsconfig-target"
},
Environment
Node : 16.15.0
OS : darwin arm64
yarn : 1.22.18
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 : Not Found
@nrwl/jest : 14.1.4
@nrwl/js : 14.1.4
@nrwl/linter : 14.1.4
@nrwl/nest : 14.1.4
@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 : 7.5.5
---------------------------------------
Community plugins:
@auth0/auth0-angular: 1.9.0
ng2-charts: 3.0.9
@sharethrough/nx-deploy: 2.3.1
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (3 by maintainers)
I have still this issue 😦 => run migration against nrwl/workspace 15 coming from 13
Same as @tobiashoeft
@leosvelperez is working on a fix for it. Stay tuned 👍
Workarounds
@angular/clifrommigrations.jsonand proceed.Migrating an Angular workspace from Nx 14.5.8 to 15.8.1 was giving me this error on
nx migrate --run-migrations:Manually installing
@angular/clito latest (15.2.0) before runningnx migrate --run-migrationsresolved this. It was still left on 14.1.0 by the originalnx migratecommand.Related to @muuvmuuv’s comment:
Running with
Nx 15.2.3leads toSame here
Same for
update-workspace-configwhich is not fixed yet!CC: @ccosmincc (ref you here 'cause you fixed the other one)
https://github.com/nrwl/nx/blob/master/packages/angular/src/migrations/update-15-2-0/update-workspace-config.ts#L14