1.错误日志
PhantomJS not found on PATH
Downloading https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-macosx.zip
Saving to /var/folders/g_/yrcflx5178d17xjp9p799_ph0000gn/T/phantomjs/phantomjs-2.1.1-macosx.zip
Receiving...
Error making request.
Error: connect ETIMEDOUT 52.216.109.155:443
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1136:16)
2.解决办法
先安装cnpm工具,看名称就是知道国内专用的;
npm install cnpm -g --registry=http://registry.npm.taobao.org
然后再使用cnpm安装;
cnpm install
完整过程
git clone git://github.com/mobz/elasticsearch-head.git
cd elasticsearch-head/
npm install cnpm -g --registry=http://registry.npm.taobao.org
cnpm install
然后你就发现安装成功了