phantomjs-node 示例出问题
发布于 12 年前 作者 fyddaben 12830 次预览 最后一次回复是 11 年前 来自
**phantom stderr: execvp(): Too many levels of symbolic links**
var phantom=require('phantom');
exports.testPhantomCreatePage=function(beforeExit,assert) {
phantom.create(function(err,ph) {
ph.createPage(function(page){
page.open("http://www.google.com",function(status){
console.log("opened google? ",status);
});
var result=page.evaluate(function(){
return document.title;
});
console.log(result);
});
ph.exit();
});
};
有木有出现这种情况的???后台只有上面的一句话6 回复
Try this
把上面代码保存为test.js ,然后node test.js 结果相同。。还是错误, stderr: execvp(): Too many levels of symbolic links
@fyddaben 感覺是你的exec PATH有問題
參考一下這篇:
http://stackoverflow.com/questions/7027740/makefile-and-symbolic-links
windows 平台也出现同样的错误,怎么解决啊!
把phantomjs-2.0.0-windows\bin 加到PATH路径了,然后运行 casperjs test.js 结果提示 CasperJS needs PhantomJS v1.x