2

i'm trying to implement ion2-calendar from https://github.com/hsuanxyz/ion2-calendar

but when i trying to imported to my app.module.ts

i get this error :

Uncaught Error: Cannot find module "@ionic/angular" at webpackMissingModule (calendar.modal.js:13) at Object.<anonymous> (calendar.modal.js:13) at __webpack_require__ (bootstrap ff18038c92faa82fd673:54) at Object.<anonymous> (index.js:7) at __webpack_require__ (bootstrap ff18038c92faa82fd673:54) at Object.355 (main.ts:5) at __webpack_require__ (bootstrap ff18038c92faa82fd673:54) at Object.332 (main.ts:1) at __webpack_require__ (bootstrap ff18038c92faa82fd673:54) at webpackJsonpCallback (bootstrap ff18038c92faa82fd673:25) 

my app.module.ts

import { BrowserModule } from '@angular/platform-browser'; import { ErrorHandler, NgModule } from '@angular/core'; import { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular'; import { SplashScreen } from '@ionic-native/splash-screen'; import { StatusBar } from '@ionic-native/status-bar'; import { MyApp } from './app.component'; import { HomePage } from '../pages/home/home'; import { Http, Headers, RequestOptions, HttpModule } from '@angular/http'; import { CalendarModule } from 'ion2-calendar'; @NgModule({ declarations: [ MyApp, HomePage ], imports: [ BrowserModule,HttpModule, IonicModule.forRoot(MyApp), CalendarModule ], bootstrap: [IonicApp], entryComponents: [ MyApp, HomePage ], providers: [ StatusBar, SplashScreen, {provide: ErrorHandler, useClass: IonicErrorHandler} ] }) export class AppModule {} 

don't know what's wrong

5
  • according the error, please check that @ionic-angular folder presented or not in node modules Commented May 10, 2019 at 10:54
  • thank you for your reply, no i don't see it what should i do Commented May 10, 2019 at 10:56
  • delete node modules and re install and check ] Commented May 10, 2019 at 11:00
  • i get the same error Commented May 10, 2019 at 11:09
  • show us ur node modules structure pointing ionic and ionic-angular folders Commented May 10, 2019 at 11:18

1 Answer 1

3

Looks like you've downloaded the ionic 4 version of the library. Try using https://github.com/HsuanXyz/ion2-calendar/tree/v2 this version is set up for ionic-angular not @ionic/angular which it looks like your verson is. Hope this helps :)

Sign up to request clarification or add additional context in comments.

1 Comment

thank you, i had to download the version 2.2.0, now it work, npmjs.com/package/ion2-calendar

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.