gpt4 book ai didi

node.js - 通过 phantom 运行 jasmine specs,得到 "Can' t 找到变量 : describe"

转载 作者:搜寻专家 更新时间:2023-10-31 22:35:48 26 4
gpt4 key购买 nike

我在 centOS5 linux 服务器上运行它作为 CI 作业时遇到了同样的问题,使用 phantomJS 1.7(我自己编译的)

Running "jasmine" task 
Testing jasmine specs via phantom
...
[D] ["phantomjs","onResourceReceived","GET
http://127.0.0.1:8888/test/spec/CommonTest.js"]
[D] ["phantomjs","onError","ReferenceError: Can't find variable: describe", [{"file":"http://127.0.0.1:8888/test/spec/CommonTest.js","line":31,"function":""}]]
ReferenceError: Can't find variable: describe
...

规范在其他机器如 WinXP 等上运行成功

最佳答案

最后,它是由以下原因引起的:我为“node_modules”创建了一个符号链接(symbolic link)以重新使用公共(public)模块,但它阻止了 grunt-jasmine-runner 获取某物。 (还不确定)。要解决它,需要将“node_modules”文件直接复制到项目文件夹下。

关于node.js - 通过 phantom 运行 jasmine specs,得到 "Can' t 找到变量 : describe",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13506393/

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