[Chartjs]-Syntax error : Cannot use import statement outside a module in Vue2 chart js

1👍

Finally I solve it. Delete below code and referece this URL.
Why does nuxt give me this error with vue-chartjs?

import { Chart as ChartJS, Title, Tooltip, Legend, BarElement, CategoryScale, LinearScale } from 'chart.js' ChartJS.register(Title, Tooltip, Legend, BarElement, CategoryScale, LinearScale)

Leave a comment