Ng2-charts: require is not defined

Created on 1 Jun 2017  路  2Comments  路  Source: valor-software/ng2-charts

I did install the the ng2-charts and chartsjs into my angular-cli project. But I am getting the error:

VM1096:4 Uncaught ReferenceError: require is not defined
    at eval (eval at webpackJsonp.54.module.exports (addScript.js:9), <anonymous>:4:38)

...

Most helpful comment

I had the same problem, just include this to your .angular-cli.json
"apps": [ { "scripts": [ "../node_modules/chart.js/dist/Chart.min.js" ] }

All 2 comments

I had the same problem, just include this to your .angular-cli.json
"apps": [ { "scripts": [ "../node_modules/chart.js/dist/Chart.min.js" ] }

thanks, I included the wrong file.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

RKornu picture RKornu  路  3Comments

raychenfj picture raychenfj  路  3Comments

mrpotato3 picture mrpotato3  路  5Comments

hggeorgiev picture hggeorgiev  路  4Comments

tushartgsit picture tushartgsit  路  5Comments