Closed navneetsharmaui closed 3 years ago
I have the same problem when trying to migrate from from angular 10.1.0 to angular 11.0.4 and @nrwl/* 10.3.1 to 11.0.2 I was running nx 10.3.1 globally. I first updated nx from 10.3.1. to 11.0.2. I then run the migration commands
nx migrate @nrwl/workspace@latest
npm install
nx migrate --run-migrations=migrations.json
and received the same error message as reported above. This workspace started as an nx 10.3.0, so my problem can not be narrow down to workspaces <=9.
The issue is that the migration provided by the Angular framework looks at angular.json
trying to resolve the tsconfig. In your case there is no angular.json. We normally work around this issue by telling the Angular CLI to also look at workspace.json. This wasn't an option here.
We have a generic solution for this prepared and we are planning to land it by end of week. For now, the workaround is:
mv workspace.json angular.json
nx migrate --run-migrations=migrations.json
mv angular.json workspace.json
I know it's annoying.
Does it make sense?
Thank you Victor. Yes I get it. That worked as far as getting the migration run. Now run into other migration issues (ngrx code not compiling among others) but different problem. Thank you very much.
The issue is that the migration provided by the Angular framework looks at
angular.json
trying to resolve the tsconfig. In your case there is no angular.json. We normally work around this issue by telling the Angular CLI to also look at workspace.json. This wasn't an option here.We have a generic solution for this prepared and we are planning to land it by end of week. For now, the workaround is:
mv workspace.json angular.json
nx migrate --run-migrations=migrations.json
mv angular.json workspace.json
I know it's annoying.
Does it make sense?
Yes Make sense
Fixed the issue here: https://github.com/nrwl/nx/commit/4278cfd337bbee155ed5efba83c4edc3df58dd30 I'll cut a patch release tonight.
I'm going to close this. If you have any issues upgrading after the release, let me know.
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.
Current Behavior
I have a nx workspace with
nx CLI
. The workspace has angular projects and when I'm migrating it to the latest nx 11, it bumps the dependencies but the migration scripts fail and fail to update the angular 11 specific migrations.Migration script that is generated:
It fails to run all the angular specific migrations.
Expected Behavior
Should have successfully run all the update scripts in the migration.json
Steps to Reproduce
"@nrwl/workspace": "10.4.4"
yarn add -D @nrwl/angular@10.4.4
.yarn nx generate @nrwl/angular:application --name=migration-app --style=scss --directory=client --linter=eslint --routing --strict --tags='scope: migration, type: app'
yarn nx generate @nrwl/angular:library --name=core --style=scss --linter=eslint --tags='scope: core, type: utils'
and import them into the angular application.yarn run update
.yarn nx migrate --run-migrations=migrations.json
Could not find any tsconfig file. Cannot migrate away from Native view encapsulation.
The update scripts that fail
Minimal Github Repo for the issue https://github.com/navneetsharmaui/nx-migration-issue
Failure Logs
Environment