Ashwini Demouser
Ashwini Demouser

Reputation: 7

ERROR in Angular2PiwikModule is not an NgModule

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

Upvotes: 0

Views: 118

Answers (2)

Y.H. Lin
Y.H. Lin

Reputation: 1

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 {}

Upvotes: 0

Danijel
Danijel

Reputation: 64

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

import { Angular2PiwikModule } from 'angular2piwik';

Upvotes: 0

Related Questions