Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bitbucket - No binary for Chrome browser on your platform

I'm working on basic react project and I'm able to run test with karma and mocha on my mac with chrome. But bitbucket pipeline says that I do not have a chrome, so the question is how to install chrome there and will I have to install it every time with build?

my yml

image: node:7.10.0
    pipelines:
      default:
        - step:
            script:
              - npm install -g bower
              - bower install --allow-root
              - npm install
              - npm test

karma.conf.js

module.exports = function(config) {
config.set({
    basePath: '',
    frameworks: ['mocha'],
    files: [
        './tests/*.js'
    ],
    exclude: [],
    preprocessors: {
        './tests/*.js': ['webpack']
    },
    // webpack configuration
    webpack: require('./webpack.dev.js'),
    webpackMiddleware: {
        stats: 'errors-only'
    },
    reporters: ['progress'],
    port: 9876,
    colors: true,
    logLevel: config.LOG_INFO,
    autoWatch: true,
    browsers: ['Chrome'], //run in Chrome
    // Continuous Integration mode
    // if true, Karma captures browsers, runs the tests and exits
    singleRun: true,
    concurrency: Infinity
});

};

like image 341
Denys Medvediev Avatar asked Sep 02 '25 02:09

Denys Medvediev


1 Answers

The line image: node:7.10.0 in your bitbucket-pipelines.yml file specifies a Docker image to use. In your case, it’s a plain node version 7.10.0 image, so there is no Chrome contained in it.

There are two things you can do:

  • Read about Docker, learn how to create your own image that includes Chrome (or whatever other software) and then use that image in your pipeline
  • Or, probably far easier: search for an existing Docker image created by someone else which includes node, Chrome and possibly other software you might need. Then, use that image in the image: <image-name> configuration line.

In either case, once you have a suitable image, this will be needed when your pipeline is run and Chrome will be available immediately, and you will not need any kind of “installation”.

like image 56
BlueM Avatar answered Sep 05 '25 06:09

BlueM