I also had a problem with mac so I tried these steps and I got a solution
Mac OSX Version> = 10.7.5 node -v = v0.8.12
$ brew install cairo $ pkg-config --atleast-version=1.12.2 cairo $ echo $?
If it returns 1, you will need to set the PKG_CONFIG_PATH environment variable so that you can find cairo.pc and fontconfig.pc
$ locate cairo.pc $ export PKG_CONFIG_PATH=/usr/X11/lib/pkgconfig/
Running pkg-config again ...
$ pkg-config --atleast-version=1.12.2 cairo $ echo $?
If it returns 0, then everything is fine in the hood.
$ npm install canvas
Piyush Dholariya Dec 30 '15 at 12:58 2014-12-30 12:58
source share