0

I am trying to build an angular app for prod and get below error. When I tried to ng-serve, everything works fine but gives issue while building.

I understood the issue, it is for the passing number instead of a string, but I do not get it where in my code it happens. Which line number to check.

ERROR in /home/ankita/Documents/admin-panel/ecommerce-admin/src/$$_gendir/app/customer-review/customer-review.component.ngfactory.ts (830,237): Argument of type 'number' is not assignable to parameter of type 'string[]'.
ERROR in /home/ankita/Documents/admin-panel/ecommerce-admin/src/$$_gendir/app/customer-review/customer-review.component.ngfactory.ts (1435,237): Argument of type 'number' is not assignable to parameter of type 'string[]'.
ERROR in /home/ankita/Documents/admin-panel/ecommerce-admin/src/$$_gendir/app/customer-review/customer-review.component.ngfactory.ts (2024,237): Argument of type 'number' is not assignable to parameter of type 'string[]'.
ERROR in /home/ankita/Documents/admin-panel/ecommerce-admin/src/$$_gendir/app/customer-review/customer-review.component.ngfactory.ts (2637,237): Argument of type 'number' is not assignable to parameter of type 'string[]'.```
Varun Sukheja
  • 6,170
  • 5
  • 51
  • 93
  • 2
    From your error I would suggest to have a look at line 830, position 237 in file `customer-review.component.ngfactory.ts`, if its not there some more information would be great. – Max Jun 21 '19 at 07:42
  • it says file does not exist – Varun Sukheja Jun 21 '19 at 07:46
  • in customer-review/customer-review.component.ngfactory.ts line: 830 use .toString() whn u assign value – suresh bambhaniya Jun 21 '19 at 07:46
  • Okay, can you post the error message? Are there some other warnings? Could you post the whole error stack? – Max Jun 21 '19 at 07:47
  • @Max that's everything as error I see in my console – Varun Sukheja Jun 21 '19 at 07:50
  • @VarunSukheja can you share customer-review.component.ngfactory.ts line: 830 code? – suresh bambhaniya Jun 21 '19 at 07:52
  • 2
    @VarunSukheja, There are too many possibilities, we need to see customer-review component in order to say something solid. Here is my guess, you are two way binding a ui component's value to a string array and the component's output is in number type or vice versa. – talhature Jun 21 '19 at 08:03
  • Finally Found the issue: Issue is with a custom pipe used in HTML. Pipe requires an array of string but I was passing number. – Varun Sukheja Jun 21 '19 at 09:02

0 Answers0