2017-09-05 101 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。也許不是所有的庫都是必需的。