Please set env variable CHROME_BIN
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.
Related videos on Youtube
John
Updated on September 18, 2022Comments
-
John over 1 year
> 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
?-
Admin over 9 yearsTry with
export CHROME_BIN=/usr/bin/chromium-browser
and see if the tests run OK.
-