twinssbc / Ionic2-Calendar

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

Angular 9 Issue #472

Closed danielehrhardt closed 4 years ago

danielehrhardt commented 4 years ago

Hi ive tried to upgrade my Angular Project to Version 9 I get this error:

Error: Error on worker #3: Error: Failed to compile entry-point ionic2-calendar due to compilation errors:
node_modules/ionic2-calendar/weekview.js(732,28): error TS-991010: encapsulation must be a member of ViewEncapsulation enum from @angular/core
node_modules/ionic2-calendar/dayview.js(543,28): error TS-991010: encapsulation must be a member of ViewEncapsulation enum from @angular/core
node_modules/ionic2-calendar/init-position-scroll.js(54,28): error TS-991010: encapsulation must be a member of ViewEncapsulation enum from @angular/core
node_modules/ionic2-calendar/calendar.module.js(15,27): error TS-991010: Value at position 0 in the NgModule.declarations of NgCalendarModule is not a reference: [object Map]

    at ClusterWorker.compile (C:\Projekte\\\node_modules\@angular\compiler-cli\ngcc\src\main.js:170:27)
    at Worker.<anonymous> (C:\Projekte\\\node_modules\@angular\compiler-cli\ngcc\src\execution\cluster\worker.js:41:42)
    at Worker.emit (events.js:210:5)
    at process.<anonymous> (internal/cluster/worker.js:30:12)
    at process.emit (events.js:210:5)
    at emit (internal/child_process.js:876:12)
    at processTicksAndRejections (internal/process/task_queues.js:81:21)
    at ClusterMaster.onWorkerMessage (C:\Projekte\\\node_modules\@angular\compiler-cli\ngcc\src\execution\cluster\master.js:158:27)
    at C:\Projekte\\\node_modules\@angular\compiler-cli\ngcc\src\execution\cluster\master.js:46:95
    at ClusterMaster.<anonymous> (C:\Projekte\\\node_modules\@angular\compiler-cli\ngcc\src\execution\cluster\master.js:238:57)
    at step (C:\Projekte\\\node_modules\tslib\tslib.js:136:27)
    at Object.next (C:\Projekte\\\node_modules\tslib\tslib.js:117:57)
    at C:\Projekte\\\node_modules\tslib\tslib.js:110:75
    at new Promise (<anonymous>)
    at Object.__awaiter (C:\Projekte\\\node_modules\tslib\tslib.js:106:16)
    at EventEmitter.<anonymous> (C:\Projekte\\\node_modules\@angular\compiler-cli\ngcc\src\execution\cluster\master.js:232:32)
    at EventEmitter.emit (events.js:210:5)

when i run: ngcc --properties es2015 browser module main --first-only --create-ivy-entry-points

Elmabtoul88 commented 4 years ago

@twinssbc right bro its work fine thank you so much you save me i appreciate what you did for me thanks again <3

drekinov commented 4 years ago

0.6.5 break my app. reverted to 0.6.4 and everything is OK again.

[ng] ERROR in ./src/app/__REMOVED__/__REMOVED__.page.ts
[ng] Module not found: Error: Can't resolve 'ionic2-calendar/calendar' in '__REMOVED__\src\app\__REMOVED__'

angular - 9.1.11, ionic 5.2.2 and TS 3.8.3

twinssbc commented 4 years ago

@drekinov could u try changing the place you import 'ionic2-calendar/calendar' to just 'ionic2-calendar'?

Elmabtoul88 commented 4 years ago

@twinssbc for ionic5 users all versions arn't working except last v 0.6.5

drekinov commented 4 years ago

@twinssbc

thanks that worked :)

harinderratton commented 3 years ago

npm install ionic2-calendar@0.5 --save

worked for me

etonyali commented 1 year ago

Anyone who is having issues with @viewChild giving Module not found, just insert CalendarComponent from: import { CalendarComponent } from 'ionic2-calendar';

and not from: import { CalendarComponent } from 'ionic2-calendar/calendar';