Chartjs-Chartjs-node-canvas install (build) error

0👍

I believe the problem lies in the installation of node-canvas which is a dependency for chartjs-node-canvas. After spending a lot of time researching why the library isn’t getting installed, I got a lead to the following link: https://github.com/Automattic/node-canvas/wiki#installation-guides

I installed the below-mentioned dependencies on my machine and used a node version of 16.x
This did the work for me.
Here is how I installed the required dependencies:

brew install pkg-config cairo pango libpng jpeg giflib librsvg

After installing these dependencies, you can install the library using npm or yarn.

Leave a comment