Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nx not able to migrate angular material and Angular CDK from 9.X.X to 11.X.X #26649

Open
1 of 4 tasks
Jay1989 opened this issue Jun 24, 2024 · 1 comment
Open
1 of 4 tasks
Assignees
Labels
blocked: more info needed scope: angular Issues related to Angular support in Nx type: bug

Comments

@Jay1989
Copy link

Jay1989 commented Jun 24, 2024

Current Behavior

We are trying to migrate old Angular mono repo project which is in 9.x.x to 11.x.x, all packages are migrated except Angular Material and CDK.
our migration.json file is like below:
{
"migrations": [
{
"version": "10.0.0-0",
"description": "Updates Angular Material to v10",
"factory": "./ng-update/index#updateToV10",
"package": "@angular/material",
"name": "migration-v10"
},
{
"version": "11.0.0-0",
"description": "Updates Angular Material to v11",
"factory": "./ng-update/index#updateToV11",
"package": "@angular/material",
"name": "migration-v11"
},
{
"version": "10.0.0-0",
"description": "Updates the Angular CDK to v10",
"factory": "./ng-update/index#updateToV10",
"package": "@angular/cdk",
"name": "migration-v10"
},
{
"version": "11.0.0-0",
"description": "Updates the Angular CDK to v11",
"factory": "./ng-update/index#updateToV11",
"package": "@angular/cdk",
"name": "migration-v11"
}
]
}
while running migration command "nx migrate --run-migrations=migrations.json" it stuck and not moving further
image

Expected Behavior

Migration should be smooth

GitHub Repo

No response

Steps to Reproduce

  1. set NX_MIGRATE_USE_LOCAL=true
  2. set NG_DISABLE_VERSION_CHECK=true
  3. nx migrate @angular/[email protected]
  4. nx migrate @angular/[email protected]
  5. npm install
  6. nx migrate --run-migrations=migrations.json

Nx Report

C:\CI-UI-Workspace\WOA_Workspace5\CI-UI-Workspace>nx report

>  NX  Report complete - copy this into the issue template

  Node : 14.15.0
  OS   : win32 x64
  npm  : 6.14.8

  nx : Not Found
  @nrwl/angular : 12.2.0
  @nrwl/cli : 12.2.0
  @nrwl/cypress : 12.2.0
  @nrwl/devkit : 12.2.0
  @nrwl/eslint-plugin-nx : Not Found
  @nrwl/express : Not Found
  @nrwl/jest : 12.2.0
  @nrwl/linter : 12.2.0
  @nrwl/nest : Not Found
  @nrwl/next : Not Found
  @nrwl/node : 12.2.0
  @nrwl/react : Not Found
  @nrwl/schematics : Not Found
  @nrwl/tao : 12.2.0
  @nrwl/web : Not Found
  @nrwl/workspace : 12.2.0
  @nrwl/storybook : Not Found
  @nrwl/gatsby : Not Found
  typescript : 4.1.4

Failure Logs

>  NX  Running migrations from 'migrations.json'

Running migration migration-v10

Package Manager Version

No response

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

node version: 14.15.0
npm version: 6.14.8

@leosvelperez leosvelperez added the scope: angular Issues related to Angular support in Nx label Jun 26, 2024
@leosvelperez leosvelperez self-assigned this Jun 26, 2024
@leosvelperez
Copy link
Member

Please provide more details to help us reproduce the issue accurately:

  • What is the Nx packages' version before running the migration?
    • I can see the final version is 12.2.0, and given you're migrating Angular 9 to 11, I'm assuming you're migrating from Nx 9.x.x
  • What command(s) did you run to migrate the Nx packages?
    • Please include both the nx migrate <version> and nx migrate --run-migrations commands for all packages. Based on a previous issue you had created, I'm assuming you ran first the migration for @nrwl/workspace and then for @angular/cdk and @angular/material.
    • Did you migrate straight from Nx 9.x.x to 12.x.x and from Angular 9.x.x to 11.x.x? Or did you migrate them incrementally, one major version at a time?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked: more info needed scope: angular Issues related to Angular support in Nx type: bug
Projects
None yet
Development

No branches or pull requests

2 participants