0

when i run the ng build it works fine. in case of ng build --prod throws following errors mostly. what is the issue how to fix them?

here is the errors:

app/pf-services/cms/components/translation-status/translation-status.component.ts:14:18
    14     templateUrl: './translation-status.component.html',
                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Error occurs in the template of component TranslationStatusComponent.
app/pf-services/cms/components/translation-status/translation-status.component.html:114:1 - error TS8001: 'shell-modals-popup' is not a valid HTML element.

114 <shell-modals-popup [popConfig]='popConfig' (reset)="reset()"></shell-modals-popup>
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  app/pf-services/cms/components/translation-status/translation-status.component.ts:14:18
    14     templateUrl: './translation-status.component.html',
                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Error occurs in the template of component TranslationStatusComponent.
app/pf-services/cms/components/translation-status/translation-status.component.html:114:21 - error TS8002: 'popConfig' is not a valid property of <shell-modals-popup>.

114 <shell-modals-popup [popConfig]='popConfig' (reset)="reset()"></shell-modals-popup>
                        ~~~~~~~~~~~~~~~~~~~~~~~

  app/pf-services/cms/components/translation-status/translation-status.component.ts:14:18
    14     templateUrl: './translation-status.component.html',
                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Error occurs in the template of component TranslationStatusComponent.
app/pf-services/cms/containers/shell-control-type/shell-control-type.component.html:1:1 - error TS8001: 'control-type' is not a valid HTML element.

  1 <control-type
    ~~~~~~~~~~~~~
  2     [sourceData]="data | async"
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
  7     (miscActions)="miscActions($event)"
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  8 ></control-type>
    ~~~~~~~~~~~~~~~~

  app/pf-services/cms/containers/shell-control-type/shell-control-type.component.ts:11:16
    11   templateUrl: './shell-control-type.component.html',
                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Error occurs in the template of component ShellControlTypeComponent.
app/pf-services/cms/containers/shell-control-type/shell-control-type.component.html:2:5 - error TS8002: 'sourceData' is not a valid property of <control-type>.
3gwebtrain
  • 14,640
  • 25
  • 121
  • 247
  • Try `ng serve --prod`, for me it produces better (i.e. more readable) error messages. – mbojko Sep 23 '19 at 12:36
  • The `--prod` flag adds extra type checking. So you just need to fix the errors. If you don't know how we need a [mcve] – Liam Sep 23 '19 at 12:38
  • `ng serve --aot --prod` should display some detailed error msg – zerocewl Sep 23 '19 at 12:39
  • prod build use aot if you didnt change it in the angular.json, everything that you use in template must be public in ts – tano Sep 23 '19 at 12:40

1 Answers1

2

I'm not sure but you can try this:

Before :

<shell-modals-popup [popConfig]='popConfig' (reset)="reset()"></shell-modals-popup>
<control-type [sourceData]="data | async" (miscActions)="miscActions($event)"></control-type>

After :

<shell-modals-popup [popConfig]="popConfig" (reset)="reset()"></shell-modals-popup>
<control-type [sourceData]="{{data | async}}" (miscActions)="miscActions($event)"></control-type>
Quentin
  • 1,865
  • 2
  • 24
  • 40