1๐
โ
I found it. I forget to register the plugin. Before I used another plugin which is no manually ad required. But it seems some of plugins are not globally added. We should add them manually..
const Chart = require("chart.js");
const Annotation = require("chartjs-plugin-annotation");
Chart.plugins.register(Annotation);
Source:stackexchange.com