traingenerator icon indicating copy to clipboard operation
traingenerator copied to clipboard

Ionic 4 : ion2-calendar has no exported member 'IonContent'

Open Histouche opened this issue 5 years ago • 2 comments

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

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 [ x] help me

Current behavior: after Ionic serve : ERROR in node_modules/ion2-calendar/dist/components/calendar.modal.d.ts(2,38): error TS2305: Module '"D:/www_app/xxxxxxxx/node_modules/@ionic/angular/dist/index"' has no exported member 'IonContent'.

Expected behavior:

Steps to reproduce:

  • npm install ion2-calendar@next moment --save
  • declarations in app.module.ts
  • run ionic serve and have the same error each time
import { IonicModule, IonicRouteStrategy } from '@ionic/angular';
...
import { CalendarModule } from 'ion2-calendar';
@NgModule({
  declarations: [
    AppComponent],
  entryComponents: [],
  imports: [
    BrowserModule,
    IonicModule.forRoot({
      backButtonText: '',
      mode: 'ios',
    }),
    CalendarModule,
    IonicStorageModule.forRoot(),
    AppRoutingModule,
    JwtModule.forRoot({
      jwtOptionsProvider: {
        provide: JWT_OPTIONS,
        useFactory: jwtOptionsFactory,
        deps: [Storage]
      }
    }),
    HttpModule,
    HttpClientModule,
    ChartsModule,
  ],
  providers: [
    StatusBar,
    SplashScreen,
    { provide: RouteReuseStrategy, useClass: IonicRouteStrategy },
    LoginActivate
  ],
  exports: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

Other information:

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

ionic (Ionic CLI) : 4.2.1 (C:\Users\Utilisateur\AppData\Roaming\npm\node_modules\ionic) Ionic Framework : @ionic/angular 4.0.0-beta.17 @angular-devkit/build-angular : 0.10.7 @angular-devkit/schematics : 7.0.7 @angular/cli : 7.0.7 @ionic/angular-toolkit : 1.4.0

Need some helps about this. Thanks

Histouche avatar Mar 08 '19 10:03 Histouche

This happened to me as well, it has to do with Ionic version.

Since version 4.0 it seems that all classes from ionic got added 'Ion' as a prefix (Content -> IonContent). This will get solved if you upgrade to version 4.0 rather than having a 4.x beta

rodrigojrmartinez avatar Mar 08 '19 11:03 rodrigojrmartinez

update ionic version to 4.0.0 or update @ionic/angular to v4.0.0 ?

asd456680 avatar Sep 13 '19 03:09 asd456680