2017-09-05 196 views
0

我有流浪虚拟机,我可以从那里访问一些端点(通过卷曲)。我安装了节点(v 8.4.0)和npm(v 5.3.0)。我通过sudo运行它。我使用恶梦JS,它不能连接到端点。我运行另一台机器上相同的测试情况和它的作品没有超时:nightmareJS超时流浪者

测试/ test_simple.js

​​

当我运行:

sudo npm test 

再有一个超时:

> [email protected] test /home/vagrant/project/codecept 
> mocha 



    UI Flow Tests 
    Using the App 
     customize 
     1) should work without timing out 


    0 passing (1m) 
    1 failing 

    1) UI Flow Tests Using the App customize should work without timing out: 
    Error: Timeout of 60000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. 




npm ERR! Test failed. See above for more details. 

编辑

我试过节点v8.3.0和噩梦2.8和2.4.1但同样的错误。看起来像流浪汉阻止请求

EDIT2 我跑在调试节点恶梦,我得到错误与电子(?): DEBUG=nightmare npm test

nightmare electron child process exited with code 127: command not found - you may not have electron installed correctly +0ms nightmare queueing action "goto" for http://simple-form-bootstrap.plataformatec.com.br/documentation +3ms nightmare running +2ms

EDIT3 deguggin电子给出: electron:stderr /home/vagrant/te/node_modules/electron/dist/electron: error while loading shared libraries: libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory

+0

我也可以重现他们的例子的问题,所以可能与最新版本的一些错误? –

+0

@TarunLalwani我更新的问题,降级没有帮助 –

+0

我试过mac,vm,docker,没有任何工作。我猜想一些与电子设置有关的东西 –

回答

0

我不得不安装libxss1 libnspr4-0d libcurl 3,libx11-xcb-dev。也许不是所有的库都是必需的。