question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug(schematics): migration schmatics report error without much useful information

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:13 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
princemaplecommented, Dec 1, 2022

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:

image

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 😃

0reactions
alexfung888commented, Dec 1, 2022

Mine.

      <mat-card
        [style.width]="na === 1 ? '90%' : '18rem'"
      >

becomes

      <mat-cardappearance="outlined"
        [style.width]="na === 1 ? '90%' : '18rem'"
      >
Read more comments on GitHub >

github_iconTop Results From Across the Web

angular/cli reports 'this.tree.readText is not a function' when ...
tree.readText in the code. It seems only to be used in the @schematics package in conjuction with reading and writing the workspace. Following ......
Read more >
Deprecated APIs and features - Angular
This section lists all deprecated features, which includes template syntax, configuration options, and any other deprecations not listed in the Deprecated APIs ...
Read more >
@schematics/angular | Yarn - Package Manager
Fast, reliable, and secure dependency management.
Read more >
Angular Schematics – The Solution to All Your Problems
package.json - provide path to schematic collection ... _context.logger.info('Thanks for using schematics!'); ... Migrations are also Angular schematics.
Read more >
Database migration: Concepts and principles (Part 1)
The following diagram illustrates this database migration process. ... and does not store it in the target databases because of some error.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found