components: bug(schematics): migration schmatics report error without much useful information
Is this a regression?
- Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
No response
Description
Cannot read properties of undefined (reading 'sourceSpan')
Reproduction
N/A
Expected Behavior
Report file, relevant module and other useful information.
Actual Behavior
Cannot read properties of undefined (reading 'sourceSpan')
and nothing else.
Environment
- Angular: 15.0.0
- CDK/Material: 15.0.0
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 18 (10 by maintainers)
Commits related to this issue
- feat(material/schematics): improve mdc-migration error logging * fixes issue #26038 * catch & log errors from tmpl migrations — committed to wagnermaciel/components by wagnermaciel 2 years ago
- feat(material/schematics): improve mdc-migration error logging * related to issue #26038 * catch & log errors from tmpl migrations — committed to wagnermaciel/components by wagnermaciel 2 years ago
- fix(material/schematics): improve mdc-migration error logging * related to issue #26038 * catch & log errors from tmpl migrations — committed to wagnermaciel/components by wagnermaciel 2 years ago
- fix(material/schematics): improve mdc-migration error logging (#26060) * fix(material/schematics): improve mdc-migration error logging * related to issue #26038 * catch & log errors from tmpl migrat... — committed to angular/components by wagnermaciel 2 years ago
- fix(material/schematics): improve mdc-migration error logging (#26060) * fix(material/schematics): improve mdc-migration error logging * related to issue #26038 * catch & log errors from tmpl migrat... — committed to angular/components by wagnermaciel 2 years ago
- fix(material/schematics): add undefined check * potential fix for issue #26038 — committed to wagnermaciel/components by wagnermaciel 2 years ago
- fix(material/schematics): add undefined check (#26081) * potential fix for issue #26038 — committed to angular/components by wagnermaciel 2 years ago
- fix(material/schematics): add undefined check (#26081) * potential fix for issue #26038 (cherry picked from commit 3c03ad480ae9f3028e3195a81c9321fbde0caf8a) — committed to angular/components by wagnermaciel 2 years ago
- fix(material/schematics): fix card tmpl migration * fixes #26038 — committed to wagnermaciel/components by wagnermaciel 2 years ago
- fix(material/schematics): fix card tmpl migration * fixes #26038 — committed to wagnermaciel/components by wagnermaciel 2 years ago
- fix(material/schematics): fix card tmpl migration (#26169) * fixes #26038 — committed to angular/components by wagnermaciel 2 years ago
- fix(material/schematics): fix card tmpl migration (#26169) * fixes #26038 (cherry picked from commit c8961cd13454772d4a56b9cc2ace61c5209c3cf3) — committed to angular/components by wagnermaciel 2 years ago
- fix(material/schematics): improve logging of mdc-migration ts migrator * related to issue #26038 — committed to wagnermaciel/components by wagnermaciel a year ago
- fix(material/schematics): improve logging of mdc-migration ts migrator * related to issue #26038 — committed to wagnermaciel/components by wagnermaciel a year ago
- fix(material/schematics): add string literal check * related to issue #26038 — committed to wagnermaciel/components by wagnermaciel a year ago
- fix(material/schematics): improve logging of mdc-migration ts migrator (#26377) * fix(material/schematics): improve logging of mdc-migration ts migrator * related to issue #26038 * fixup! fix(mater... — committed to angular/components by wagnermaciel a year ago
- fix(material/schematics): improve logging of mdc-migration ts migrator (#26377) * fix(material/schematics): improve logging of mdc-migration ts migrator * related to issue #26038 * fixup! fix(mater... — committed to angular/components by wagnermaciel a year ago
- fix(material/schematics): add string literal check (#26475) * related to issue #26038 — committed to angular/components by wagnermaciel a year ago
- fix(material/schematics): add string literal check (#26475) * related to issue #26038 (cherry picked from commit 834e865d48cac7abe3c4316b83591321d6baf5a5) — committed to angular/components by wagnermaciel a year ago
I got the message “Cannot read properties of undefined (reading ‘text’)”
Latching onto this issue because it looks essentially the same.
Two differences though. The error is
Cannot read properties of undefined (reading 'length')
and limiting to certain components doesn’t change anything.Would love some sort of verbose option to post something more meaningful.
Hello @wagnermaciel , I’m reporting back about the mdc migration.
Your
undefined
fix made it possible for the migration script to finish. I noticed this weird thing after migration:Looks like multi line mat-card tag gave the migration script a hard time, and the previous error? Not sure if it’s the real cause. Anyway, I’m very glad that I can finish this migration by just adding a space.
I’m quite surprised that this is the only place where I have a mat-card that spanned multiple lines. I’d think there were more, given how often I use mat-card 😃