ERROR in Angular2PiwikModule is not an NgModule

121 Views Asked by At

While I' compile the code first time or try to build project using ng build --prod command it shows error.

I'v installed "angular2piwik": "^0.1.7-beta" and I'm using following versions:

"@angular/compiler": "2.4.9", 
"@angular/cli": "1.2.6", 
"@angular/compiler-cli": "2.4.9"
//app.module.ts file
import { Angular2PiwikModule } from "angular2piwik/dist";


@NgModule({
  imports: [
    Angular2PiwikModule
})

I expect to run project without any error, but actual it shows ERROR in Angular2PiwikModule is not an NgModule error

2

There are 2 best solutions below

0
Danijel On

Have you try to import Angular2PiwikModule like is in the official documentation:

import { Angular2PiwikModule } from 'angular2piwik';

0
Y.H. Lin On

Please update your node_modules/angular2piwik/dist/index.d.ts to

import { NgModule } from '@angular/core';

export * from './piwik-functions';
export * from './angular-piwik-components';

@NgModule({})
export class Angular2PiwikModule {}