Angular Material 14升级至15时MDC迁移脚本执行失败
Angular Material MDC迁移报错:Cannot read properties of undefined (reading 'length')
我按照迁移指南执行了以下命令:
ng generate @angular/material:mdc-migration
执行时的交互及输出如下:
? Limit the migration to a specific directory? (Enter the relative path such as 'src/app/shared' or leave blank for all directories) src/app/shared ? What components do you want to migrate? Button, Card, Checkbox Limiting migration to: src/app/shared Migrating components: button card checkbox Migrating project: dummy-frontend Cannot read properties of undefined (reading 'length')
临时解决方法
- 拆分迁移范围,逐个文件夹单独执行该迁移脚本,即可绕过此报错完成组件迁移。
内容的提问来源于stack exchange,提问作者Juri
相关产品推荐
相关产品推荐

