gpt4 book ai didi

node.js - banquo/phantom nodejs 错误 - 无法读取未定义的属性 'createPage'

转载 作者:太空宇宙 更新时间:2023-11-03 21:59:27 25 4
gpt4 key购买 nike

我正在尝试运行 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 变量。

关于node.js - banquo/phantom nodejs 错误 - 无法读取未定义的属性 'createPage',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31024163/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com