Chartjs-Angular 2 & ng2-charts: (SystemJS) Unexpected directive 'BaseChartComponent' imported

0👍

From the code mentioned above , what I understand is you are importing directives from ng2-charts library inside Module.

probably this is the cause you are having error.

Try importing module :

import { ChartsModule } from 'ng2-charts/ng2-charts';

// In your App's module:
imports: [
   ChartsModule
]

Hope this helps.

0👍

I had the same problem. I added this to my system.config.js file to fix the problem:

map: {
ng2-charts':                'npm:ng2-charts'
'ng2-charts': {
          defaultExtension: 'js'
      }

Leave a comment