twinssbc / Ionic2-Calendar

A calendar component based on Ionic framework
https://ionic-calendar-demo.stackblitz.io
MIT License
389 stars 197 forks source link

ionic cordova android prod build failed for the pages which used ionic2-calendar #631

Open prabhashibuddhima opened 2 years ago

prabhashibuddhima commented 2 years ago

I'm trying to build my ionic cordova app and when I do ionic cordova build android --prod --release it shows following errors. (I'm using ionic5)

Error: src/app/pages/calendar/calendar.page.html:35:34 - error TS2339: Property 'eventSource' does not exist on type 'CalendarPage'.

35         <calendar [eventSource]="eventSource" [calendarMode]="calendar.mode" [showEventDetail]="false"
                                    ~~~~~~~~~~~

  src/app/pages/calendar/calendar.page.ts:10:16
    10   templateUrl: './calendar.page.html',
                      ~~~~~~~~~~~~~~~~~~~~~~
    Error occurs in the template of component CalendarPage.

Error: src/app/pages/calendar/calendar.page.html:35:48 - error TS2322: Type 'string' is not assignable to type 'CalendarMode'.

35         <calendar [eventSource]="eventSource" [calendarMode]="calendar.mode" [showEventDetail]="false"
                                                  ~~~~~~~~~~~~

  src/app/pages/calendar/calendar.page.ts:10:16
    10   templateUrl: './calendar.page.html',
                      ~~~~~~~~~~~~~~~~~~~~~~
    Error occurs in the template of component CalendarPage.

Error: src/app/pages/calendar/calendar.page.html:37:57 - error TS2322: Type 'string' is not assignable to type 'number'.

37           (onTitleChanged)="onViewTitleChanged($event)" startingDayWeek="1" [monthviewDisplayEventTemplate]="template"
                                                           ~~~~~~~~~~~~~~~

  src/app/pages/calendar/calendar.page.ts:10:16
    10   templateUrl: './calendar.page.html',
                      ~~~~~~~~~~~~~~~~~~~~~~
    Error occurs in the template of component CalendarPage.

Error: src/app/pages/diet-plans/diet-plans.page.html:36:28 - error TS2339: Property 'eventSource' does not exist on type 'DietPlansPage'.

36   <calendar [eventSource]="eventSource" [calendarMode]="calendar.mode" [currentDate]="calendar.currentDate"
                              ~~~~~~~~~~~

  src/app/pages/diet-plans/diet-plans.page.ts:11:16
    11   templateUrl: './diet-plans.page.html',
                      ~~~~~~~~~~~~~~~~~~~~~~~~
    Error occurs in the template of component DietPlansPage.

Error: src/app/pages/diet-plans/diet-plans.page.html:36:42 - error TS2322: Type 'string' is not assignable to type 'CalendarMode'.

36   <calendar [eventSource]="eventSource" [calendarMode]="calendar.mode" [currentDate]="calendar.currentDate"
                                            ~~~~~~~~~~~~

  src/app/pages/diet-plans/diet-plans.page.ts:11:16
    11   templateUrl: './diet-plans.page.html',
                      ~~~~~~~~~~~~~~~~~~~~~~~~
    Error occurs in the template of component DietPlansPage.

Error: src/app/pages/diet-plans/diet-plans.page.html:37:95 - error TS2322: Type 'string' is not assignable to type 'number'.

37     (onEventSelected)="onEventSelected($event)" (onTitleChanged)="onViewTitleChanged($event)" startingDayWeek="1"
                                                                                                 ~~~~~~~~~~~~~~~

  src/app/pages/diet-plans/diet-plans.page.ts:11:16
    11   templateUrl: './diet-plans.page.html',
                      ~~~~~~~~~~~~~~~~~~~~~~~~
    Error occurs in the template of component DietPlansPage.

[ERROR] An error occurred while running subprocess ng.

Screenshot 2022-01-26 at 20 44 44

twinssbc commented 2 years ago

@prabhashibuddhima if you use "ionic serve" to local run, do these error appear?

prabhashibuddhima commented 2 years ago

Hi, sorry for the late reply. No.. it's working fine for ionic serve andionic cordova build android

prabhashibuddhima commented 2 years ago

@twinssbc is there any solution? I'm struggling with this over more than 2 weeks now.

RaviMishra160 commented 1 year ago

I'm trying to build my ionic cordova app and when I do ionic cordova build android --prod --release it shows following errors.

ERROR in src/app/cal/cal.page.html:49:3 - error TS2322: Type 'string' is not assignable to type 'CalendarMode'.

49 [calendarMode]="calendar.mode"


  src/app/cal/cal.page.ts:14:16
    14   templateUrl: './cal.page.html',
Error occurs in the template of component CalPage.