“Cannot start Chrome” error with Yeoman

后端 未结 4 587
被撕碎了的回忆
被撕碎了的回忆 2021-01-03 09:03

I\'m trying to start using Yeoman (it seems awesome indeed) and having an error trying to run the grunt test command.

Running \"karma:unit\" (ka         


        
相关标签:
4条回答
  • 2021-01-03 09:25

    It's fairly clear from the error message that it can't find google-chrome, which is set as the browser in your Karma config. You either need to change this to another browser or manually set the path to the Chrome binary using the CHROME_BIN environment variable.

    0 讨论(0)
  • 2021-01-03 09:36

    Alternatively, instead of setting the env variable globally, you can set it only for the command you're running:

    CHROME_BIN=chromium-browser grunt test
    
    0 讨论(0)
  • Expanding on the above, for Linux systems, you can point the CHROME_BIN env variable to the chromium binary:

    export CHROME_BIN="/usr/bin/chromium-browser"
    
    0 讨论(0)
  • 2021-01-03 09:47

    this worked for me on ubuntu 12.04

    echo 'export CHROME_BIN="/usr/bin/chromium-browser"' >> ~/.bashrc && source ~/.bashrc
    
    0 讨论(0)
提交回复
热议问题