gpt4 book ai didi

node.js - 错误 : CAIRO_FORMAT_RGB30 was not declared in this scope

转载 作者:搜寻专家 更新时间:2023-11-01 00:11:59 24 4
gpt4 key购买 nike

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

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com