1👍
✅
Fixed the issue by moving:
const renderer = new ChartJSNodeCanvas({
width: 800,
height: 300,
backgroundColour: "white"
});
Outside of the function.
Source:stackexchange.com