MeetmeLeave / ng-canvas-gauges

Angular2 component wrapper for the canvas-gauges library written by @Mikhus(https://github.com/Mikhus/canvas-gauges).
MIT License
38 stars 23 forks source link

Module build failed #17

Open juliogsantana opened 5 years ago

juliogsantana commented 5 years ago

Hi,

I'm trying this on Ionic. I followed the install instructions. Then added imports to app.module.ts

Ionic: ionic (Ionic CLI) : 4.10.2 Ionic Framework : ionic-angular 3.9.2 @ionic/app-scripts : 3.1.9

Cordova:

cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1) Cordova Platforms : android 7.1.0 Cordova Plugins : cordova-plugin-ionic-keyboard 2.0.5, cordova-plugin-ionic-webview 1.1.1, (and 9 other plugins)

System:

Android SDK Tools : 26.1.1 NodeJS : v8.0.0 npm : 6.7.0 OS : Linux 4.4

My app.module.ts:

import { BrowserModule } from '@angular/platform-browser';
import { HttpClientModule } from '@angular/common/http';
import { ErrorHandler, NgModule } from '@angular/core';
import { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular';
import { MyApp } from './app.component';
import { SplashScreen } from '@ionic-native/splash-screen';
import { StatusBar } from '@ionic-native/status-bar';

import {GaugesModule} from 'ng-canvas-gauges/lib';

@NgModule({
  declarations: [
    MyApp    
  ],
  imports: [
    BrowserModule,
    HttpClientModule,
    GaugesModule,
    IonicModule.forRoot(MyApp),
    IonicStorageModule.forRoot()
  ],
  bootstrap: [IonicApp],
  entryComponents: [
    MyApp
  ],
  providers: [
    SplashScreen,
    StatusBar,
    {provide: ErrorHandler, useClass: IonicErrorHandler}
  ]
})
export class AppModule {}

ERROR

[``` 12:39:19] ngc started ... [12:39:22] typescript error Unexpected value 'GaugesModule in /../../../../node_modules/ng-canvas-gauges/lib/index.d.ts' imported by the module 'AppModule in /../../../../src/app/app.module.ts'. Please add a @NgModule annotation.



Would you help me