我正在尝试让我的Mac上运行node-canvas模块,但是只要我调用require('canvas')
,就会收到此错误:
Error: dlopen(/Users/james/projects/audiogram/node_modules/canvas/build/Release/canvas.node, 1): Symbol not found: _OBJC_CLASS_$_NSFont
Referenced from: /Library/Frameworks/Mono.framework/Versions/4.8.1/lib/libpangocairo-1.0.0.dylib
Expected in: flat namespace
in /Library/Frameworks/Mono.framework/Versions/4.8.1/lib/libpangocairo-1.0.0.dylib
at Object.Module._extensions..node (module.js:598:18)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/Users/james/projects/audiogram/node_modules/canvas/lib/bindings.js:3:18)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
我在node-canvas repo上发布了an issue,但我还没有收到任何回复。
Node 7.8.0
NPM 4.2.0
node-canvas 1.6.5
OSX 10.12.5
我的具体问题是:为什么我错过了这个符号,我该如何解决?