无法在Mac OS X中安装Fabric.js El Capitan
问题描述:
我无法在我的Mac上安装fabric.js。无法在Mac OS X中安装Fabric.js El Capitan
npm ERR! Darwin 15.2.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "fabric"
npm ERR! node v4.2.1
npm ERR! npm v3.8.0
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the canvas package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs canvas
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls canvas
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/AirShaos/Documents/dev/prospace/repo/prospace_strongloop_cms/npm-debug.log
npm ERR! code 1
该错误基本上与'node-gyp'有关,我根本不知道它。我的节点版本是4.2.1,npm版本是3.8.0。有没有人遇到过这个问题?
答
这是一个节点画布安装错误。参考这里的指示。
https://github.com/Automattic/node-canvas
也许你需要运行:
brew install pkg-config cairo libpng jpeg giflib