我正在尝试运行 https://github.com/ajam/banquo-server以及接收和错误
Cannot read property 'createPage' of undefined
Express server listening on port 3000
Requesting http://america.aljazeera.com
/root/banquo-server/node_modules/banquo/src/banquo.js:36
ph.createPage(openPage);
^
TypeError: Cannot read property 'createPage' of undefined
at createPage (/root/banquo-server/node_modules/banquo/src/banquo.js:36:7)
at /root/banquo-server/node_modules/node-phantom/node-phantom.js:65:6
at null._onTimeout (/root/banquo-server/node_modules/node-phantom/node-phantom.js:43:5)
at Timer.listOnTimeout (timers.js:110:15)
error: Forever detected script exited with code: 1
error: Script restart attempt #7
connect.multipart() will be removed in connect 3.0
visit https://github.com/senchalabs/connect/wiki/Connect-3.0 for alternatives
connect.limit() will be removed in connect 3.0
我已检查并从 node-phantom.js:36 返回错误,但未指定错误内容。
有什么想法吗?
问候
我遇到了同样的问题,并通过将 phantomjs 二进制文件添加到 PATH 来修复它。 .
您可以运行命令来测试是否已设置:
$ phantomjs
以下错误表明事实并非如此:
'phantomjs' is not recognized as an internal or external command, operable program or batch file
正如您在 comment 中所说:
not a bug as this works on my local mac, not on external server
所以,这不是您的代码的问题。这是您的环境的问题,所以我猜您也错过了设置 PATH 变量。
我是一名优秀的程序员,十分优秀!