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
然後你就發現安裝成功了