10
> node node_modules/karma/bin/karma start test/karma.conf.js INFO [karma]: Karma v0.12.30 server started at http://localhost:9876/ INFO [launcher]: Starting browser Chrome ERROR [launcher]: Cannot start Chrome Can not find the binary google-chrome Please set env variable CHROME_BIN 

OK, I appreciate this must be a gigantic nooby style question, but I am still in the process of attempting to migrate my life from Windows and every now and again something like this trips me up.

I am going through an Angular JS tutorial.

When attempting to run a series of test I am confronted with the above message.

The /etc/environment file now reads (note the Chromium ending):

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games/:/usr/bin/chromium-browser:" 

I then ran

source /etc/environment 

Restarted terminal and attempted the tests again, but I have the same result.

What is the error really telling me? Am I meant to set a new variable named CHROME_BIN and point this to /usr/bin/chromium-browser?

1
  • Try with export CHROME_BIN=/usr/bin/chromium-browser and see if the tests run OK. Commented Jan 2, 2015 at 0:00

1 Answer 1

24

Your node wants to start Chrome (or any browser) and use environment variables to set it out. Just export the variable along with the path pointing to the binary and it should work:

export CHROME_BIN=/usr/bin/chromium-browser 

Now, actually it should just call sensible-browser instead of forcing you to do this.

1
  • Thank you, this is the correct answer for me. Commented Aug 15, 2022 at 11:03

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.