phantomjs:找不到命令

时间:2014-11-01 19:18:11

标签: phantomjs sh

我正在使用此blog post提供的代码来捕获Angular页面的快照,但是当我尝试运行时

./make-snapshot.sh http://localhost:5757/#!/home

我收到错误

phantomjs: command not found

以下是该文件的内容:

U=$1
P=$( echo "$U" | perl -MURI -le 'chomp($url = <>); print URI->new($url)->fragment' )
final_url=$U
P=${P:1}
final_path=./snapshots$P.html
phantomjs .phantomjs-runner.js $final_url > $final_path

有关此page的详细信息。

phantomjs适用于我的终端

enter image description here

1 个答案:

答案 0 :(得分:0)

问题是,当我克隆这个回购时,它从未下载文件.phantom-runner.js。

现在有效!