首页 文章

不行1在CI上运行`ember test`时,PhantomJS意外退出

提问于
浏览
4

自从更新到ember-cli 1.13.8和Ember 2.0.0(从1.13.1 / 1.12.x)以来,由于错误,我无法让测试套件在CircleCI上运行:

not ok 1 PhantomJS - Browser "phantomjs /home/ubuntu/app-name/node_modules/ember-cli/node_modules/testem/assets/phantom.js http://localhost:7357/7887" exited unexpectedly.
1..1
tests 1
pass  0
fail  1
npm ERR! Test failed.  See above for more details.
npm test returned exit code 1

以前它曾经工作过,有什么奇怪的,它在本地工作(OS X El Capitan,PhantomJS 2.0) . 在CircleCI上它也运行在2.0版本上,安装方式如下:

$ sudo apt-get update; sudo apt-get install libicu52
$ curl --output /home/ubuntu/bin/phantomjs-2.0.1-linux-x86_64-dynamic https://s3.amazonaws.com/circle-support-bucket/phantomjs/phantomjs-2.0.1-linux-x86_64-dynamic
$ chmod a+x /home/ubuntu/bin/phantomjs-2.0.1-linux-x86_64-dynamic
$ sudo ln -s --force /home/ubuntu/bin/phantomjs-2.0.1-linux-x86_64-dynamic /usr/local/bin/phantomjs

也尝试从特拉维斯下载它,但仍然发生了同样的事情 .

知道是什么原因以及如何解决它?

2 回答

  • 2

    尝试单独运行phantomjs以找出哪个依赖项失败,我在Docker容器上遇到了同样的问题,运行后我发现我需要一个额外的库来运行它 .

    我在Ubuntu上缺少以下依赖项

    libgtk2.0-0 libidn11 libglu1-mesa

  • 0

    实际上在将Ember更新到2.3.1后,PhantomJS开始没有任何问题,不知道这背后的真正原因是什么,但如果有人遇到这个问题,请尝试更新Ember并再次检查 .

相关问题