I'm facing an issue with the plugin while trying to use it in different ways. Whenever I mention "ChartModule.forRoot (require ('highcharts'))," it results in this exception
import { ChartModule } from 'angular2-highcharts';
import { HighchartsStatic } from 'angular2-highcharts/dist/HighchartsService';
declare var require: any;
export function highchartsFactory() {
const highcharts = require('highcharts');
const highChartsMore = require('highcharts/highcharts-more');
const solidGauge = require('highcharts/modules/solid-gauge');
ChartModule.forRoot(require('highcharts'),
require('highcharts/highcharts-more'),
require('highcharts/modules/solid-gauge'));
return highcharts;
}