Closed zongcong closed 2 years ago
请问是不是作者这个库是不是用了这个依赖?
用cnpm安装
我也是canvas@2.8.0 install: node-pre-gyp install --fallback-to-build
报错,查看了这个库的,我使用的是node 64位 14.17.0版本,用的是cnpm镜像,怎么安装都报错
遇到了同样的问题,实际我点开那个下载地址,提示404。 下载位置不对,修一下吧。
@gswy 更新新版本看看
@Binaryify cnpm npm yarn都有试过。三者都是报同一个错误。
✔ Installed 1 packages
✔ Linked 63 latest versions
[1/1] scripts.install vue-qr@3.2.4 › canvas@2.9 run "node-pre-gyp install --fallback-to-build", root: "/Users/wanyun/Project/wanyun/epidemic-prevention/admin/node_modules/_canvas@2.9.0@canvas"
node-pre-gyp http GET https://cdn.npmmirror.com/binaries/canvas/v2.9.0/canvas-v2.9.0-node-v93-darwin-unknown-arm64.tar.gz
node-pre-gyp ERR! install response status 404 Not Found on https://cdn.npmmirror.com/binaries/canvas/v2.9.0/canvas-v2.9.0-node-v93-darwin-unknown-arm64.tar.gz
node-pre-gyp WARN Pre-built binaries not installable for canvas@2.9.0 and node@16.13.2 (node-v93 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error response status 404 Not Found on https://cdn.npmmirror.com/binaries/canvas/v2.9.0/canvas-v2.9.0-node-v93-darwin-unknown-arm64.tar.gz
Package pixman-1 was not found in the pkg-config search path.
@gswy 你是m1芯片吗
@Binaryify 是的,M1。我没有x86的主机可以供测试
@gswy cnpm 安装后面 加 --target_arch=x64
新版本已经移除canvas的依赖了,现在安装应该没啥阻碍了