2

我正在尝试安装 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

我想念什么?

4

1 回答 1

9

这是最新版本的节点画布的问题。安装较旧的(例如 1.0.4):

npm install canvas@1.0.4
于 2013-08-02T12:38:52.453 回答