I’m struggling to get the charts to work again after the RC0 update. I’m struggling to debug because I believe I’m lacking some ionic ng2 experience.
How to I diagnose this problem? I’ve run the following commands:
npm install ng2-charts --save
npm install chart.js --save
Then I linked the following javascript in index.html
I used cloudflare because I noticed that other documentations pointed directly to node_modules, but when I build node_modules for ng2-charts doesn’t get served.
In this situation, what does it mean that the “js does not export ChartsModule”? When I look at the charts.js script I see the following line:
exports.ChartsModule = ChartsModule;
Any guidance is greatly appreciated.
Is this a situation where I need to modify the rollup.config.js and why?
Although, I’m still working through this. I tried to add a 2nd module and am getting the error with the 2nd one.
Maybe you grabbed the wrong js file? The one I’m pointing to has a file with very few lines of content:
“use strict”;
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty§) exports[p] = m[p];
}
__export(require(’./components/charts/charts’));
Thanks that works!
But I have a little concern about the next Ionic RC, we are going to update our dependencies and it will override rollup.config.js. So, how can we override this rollup.config.js with our own in the root directory or is there any other better way to import modules?