【发布时间】:2021-12-16 05:51:14
【问题描述】:
Node Canvas 在 m1 上不适合我
当我尝试运行我的项目时,我收到以下错误消息:
Error: dlopen(.../node_modules/canvas/build/Release/canvas.node, 0x0001): tried: '.../node_modules/canvas/build/Release/canvas.node' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/usr/local/lib/canvas.node' (no such file), '/usr/lib/canvas.node' (no such file)
已经这样做了:
brew install pkg-config cairo pango libpng jpeg giflib librsvg
xcode-select --install
npm i canvas
没有错误
不确定如何调试此问题,因为有人使用 Node Canvas 在 m1 笔记本电脑上工作,请帮忙。
【问题讨论】:
-
解决了吗?使用 mongodb 遇到同样的问题