How do I solve “Server terminated early with status 127” when running node.js on Linux?

前端 未结 5 1623
悲&欢浪女
悲&欢浪女 2021-01-17 08:27

I’m using node 5.10.0 on this version of Linux

[davea@mydevbox mydir]$ uname -a
Linux mydevbox.mydomain.com 7.3.8-25.26.amzn1.x86_64 #1 SMP Wed Mar 16 17:15:         


        
5条回答
  •  暖寄归人
    2021-01-17 09:02

    As suggested by other answers, the error message means you have unmet dependencies.

    In my case of selenium e2e test, fixes are:

    1. apt-get install default-jre as mentioned by @Johannes
    2. apt-get -f install for a fix install
    3. apt-get install chromium-browser Make sure to install the correct version of chrome related to your chromedriver, e.g. chrome 60-62 for chromedriver 2.33
    4. Config webdriver to start chrome in 'headless' mode, as to avoid other unnecessary dependencies. In node it looks like:

    const options = new chromeDriver.Options(); options.addArguments( 'headless', 'disable-gpu', ); new webdriver.Builder() .forBrowser('chrome') .setChromeOptions(options) .build();

提交回复
热议问题