budiodank / notif-app

Create Notification App With Apache Cordova
0 stars 0 forks source link

How to solve Chart.js Error in vue #9

Open budiodank opened 3 years ago

budiodank commented 3 years ago

Problem :

ERROR in ./node_modules/chart.js/dist/chart.esm.js
Module parse failed: D:\MyApp\node_modules\chart.js\dist\chart.esm.js Unexpected token (6613:12)
You may need an appropriate loader to handle this file type.
         if (intermediateIndex1 !== startIndex && intermediateIndex1 !== lastIndex) {
           decimated.push({
             ...data[intermediateIndex1],
             x: avgX,
           });
 @ ./src/imports/Dashboard/Dashboard.js 21:12-31
 @ ./src/App.js
 @ ./src/index.js
 @ multi babel-polyfill ./src/index.js

Solve : Chart.js version 3 is not compatible. Change it to ^2.9.4 on package.json. The same problem as you and I have been solved.