How can I find the ngFor that's throwing an NG0901 error?

164 Views Asked by At

My Angular app is throwing errors that look like this:

ERROR Error: NG0901
at r.find (main.js:23:776914)
at ne.ngDoCheck (main.js:23:613563)
at oe (main.js:23:670651)
at tt (main.js:23:670807)
at $ (main.js:23:670552)
at j (main.js:23:670274)
at $m (main.js:23:703235)
at Object.Gm (main.js:23:703079)
at UT (main.js:1:1668916)
at Km (main.js:23:705139)

According to this answer, this happens when an *ngFor tries to iterate over an object that isn't an array. My problem is there are over a hundred components on the page, and I have no idea which one is throwing the error. If there's a visibly broken ngFor somewhere, I can't see it. The links in the stack trace all point to generated code, none of it helpful. Is there any other way to tell which ngFor is breaking?

0

There are 0 best solutions below