Skip to content

Commit

Permalink
Work around issue with Node v14 and Puppeteer
Browse files Browse the repository at this point in the history
Use the system version of Chrome if the developer has Node v14
installed, to work around an upstream issue with Puppeteer (see code
comment).
  • Loading branch information
robertknight committed Apr 27, 2020
1 parent 5f2824a commit 9ba4775
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/karma.config.js
Expand Up @@ -7,7 +7,13 @@ const envify = require('loose-envify/custom');
const glob = require('glob');

let chromeFlags = [];
process.env.CHROME_BIN = require('puppeteer').executablePath();

if (process.version.startsWith('v14.')) {
// See https://github.com/puppeteer/puppeteer/issues/5719
console.warn('Using system Chrome instead of Puppeteer due to issue with Node 14');
} else {
process.env.CHROME_BIN = require('puppeteer').executablePath();
}

// On Travis and in Docker, the tests run as root, so the sandbox must be
// disabled.
Expand Down

0 comments on commit 9ba4775

Please sign in to comment.