“无法启动Chrome" Yeoman错误 [英] "Cannot start Chrome" error with Yeoman

查看:105
本文介绍了“无法启动Chrome" Yeoman错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试开始使用Yeoman(确实很棒),并且在尝试运行grunt test命令时出现错误.

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" (karma) task
INFO [karma]: Karma server started at http://localhost:8080/
INFO [launcher]: Starting browser Chrome
WARN [watcher]: Pattern "/home/jaywalking101/Dropbox/demokritos/test/mock/**/*.js" does not match any file.
ERROR [launcher]: Cannot start Chrome
    Can not find the binary google-chrome
    Please set env variable CHROME_BIN
Warning: Task "karma:unit" failed. Use --force to continue.

Aborted due to warnings.

搜索对我没有多大帮助.我发现了一些类似问题的参考,但据我所知,目前还不清楚.有什么线索吗?解决方案?有什么吗?

A search didn't help me much. I found some references to similar problems but nothing clear enough (to my current knowledge). Any clues? Solutions? Anything?

我正在使用Lubuntu,Node.js 0.10.15,Yeoman 1.0RC4.

I'm on Lubuntu, Node.js 0.10.15, Yeoman 1.0RC4.

对于像我一样迷路的其他人,以下问题为 Testacular错误:无法启动chrome ,让我开始考虑Ubuntu上没有Chrome浏览器,但是有Chromium.而且,尽管它不在因果代码的受支持的浏览器列表中,但它似乎是有效的选择.

For anyone else as lost as I was, the following question, Testacular error: Cannot start chrome, made me start thinking there is no Chrome Browser on Ubuntu, but there is Chromium. And although it's not in the supported browsers list on karma code it seems to be a valid option.

赞:

browsers = ['chromium-browser'];

我之前提到的问题是关于睾丸的,但是对于因果报应,该解决方案对我来说效果很好. (也许它们在某种程度上是同一个东西.我对这些主题还真不了解).

The question I mentioned before talks about testacular, but the solution worked just fine for me with karma. (perhaps they are the same thing somehow. I really do not know much about these subjects yet).

推荐答案

从错误消息中可以很明显地看出它找不到google-chrome,它已设置为Karma配置中的浏览器.您需要将其更改为其他浏览器,或者使用CHROME_BIN环境变量手动设置Chrome二进制文件的路径.

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.

这篇关于“无法启动Chrome" Yeoman错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆