hsuanxyz / ion2-calendar

📅 A date picker components for ionic2 /ionic3 / ionic4
https://hsuanxyz.github.io/demo/ion2-calendar/
MIT License
555 stars 278 forks source link

IONIC 5/6 - ERROR in Debug Failure. False expression. - error TS2307: Cannot find module 'ionic-angular'. #304

Open darkguy2008 opened 4 years ago

darkguy2008 commented 4 years ago

Ionic version: (check one with "x") [ ] 2.x [ ] 3.x [ ] 4.x [x] 5.0.7

Ion2-calendar mode: (check one with "x") [x] components mode [ ] modal mode

I'm submitting a ... (check one with "x") [x] bug report [ ] feature request [ ] help me

Current behavior: Follow the tutorial, add the module, add the component

Expected behavior: No build errors

Steps to reproduce: Create Ionic 5 app, add component.

Related code:

ERROR in Debug Failure. False expression.

    ERROR in node_modules/ion2-calendar/dist/calendar.controller.d.ts:1:33 - error TS2307: Cannot find module 'ionic-angular'.

    1 import { ModalController } from 'ionic-angular';
                                      ~~~~~~~~~~~~~~~
    node_modules/ion2-calendar/dist/calendar.module.d.ts:2:33 - error TS2307: Cannot find module 'ionic-angular'.

    2 import { ModalController } from 'ionic-angular';
                                      ~~~~~~~~~~~~~~~
    node_modules/ion2-calendar/dist/components/calendar.modal.d.ts:2:68 - error TS2307: Cannot find module 'ionic-angular'.

    2 import { NavParams, ViewController, Content, InfiniteScroll } from 'ionic-angular';

Other information:

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):

Ionic:

   Ionic CLI : 6.10.1

Utility:

   cordova-res (update available: 0.15.1) : 0.14.0
   native-run                             : 1.0.0

System:

   NodeJS : v12.16.3
   npm    : 6.14.5
   OS     : Windows 10
ShivamShokeen commented 4 years ago

I am also facing same error with the version "ion2-calendar": "^2.2.0",

ShivamShokeen commented 4 years ago

Is there any way to manually add ionic-angular library in ion2-calendar dependency?

ulver2812 commented 4 years ago

See here for the solution: https://github.com/hsuanxyz/ion2-calendar/issues/297#issuecomment-673363537