我正在尝试安装 node-canvas 模块,但出现以下错误: 当我执行 npm install canvas 时:
In file included from ../src/Canvas.cc:8:0:
../src/PNG.h: In function 'cairo_status_t canvas_write_png(cairo_surface_t*, png_rw_ptr, void*)':
../src/PNG.h:139:10: error: 'CAIRO_FORMAT_RGB30' was not declared in this scope
我错过了什么?
最佳答案
这是最新版本的 node-canvas 的问题。安装旧版本(例如 1.0.4):
npm install canvas@1.0.4
关于node.js - 错误 : CAIRO_FORMAT_RGB30 was not declared in this scope,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18000762/