npm install canvas
提示
> canvas@1.6.2 install /root/Android-Material-Icon-Generator-master/node_modules/canvas
> node-gyp rebuild
Package cairo was not found in the pkg-config search path.
Perhaps you should add the directory containing `cairo.pc'
to the PKG_CONFIG_PATH environment variable
No package 'cairo' found
原因是缺少cairo包,运行
sudo apt-getinstall libcairo2-dev libjpeg-dev libgif-dev
即可