* fix(launcher): output correct error message for browser When running `npm run release` today I got this error logged: ``` Error: Could not find browser revision 848005. Run "PUPPETEER_PRODUCT=firefox npm install" or "PUPPETEER_PRODUCT=firefox yarn install" to download a supported Firefox browser binary. at ChromeLauncher.launch (/Users/jacktfranklin/src/puppeteer/lib/cjs/puppeteer/node/Launcher.js:80:27) ``` The error is only partially correct; I did have the browser revision missing, but I needed the Chromium browser, not Firefox. It turns out the logic in `Launcher.ts` didn't take this into account; it mistakenly had been hardcoded to always log out the error as if the Firefox binary was missing. This PR updates the message depending on the browser: Chrome error: > Error: Could not find expected browser (chrome) locally. Run npm > install or yarn install to download the correct Chromium revision > (848005). Firefox error: > Error: Could not find expected browser (firefox) locally. Run > "PUPPETEER_PRODUCT=firefox npm install" or "PUPPETEER_PRODUCT=firefox > yarn install" to download a supported Firefox browser binary. * Update src/node/Launcher.ts Co-authored-by: Mathias Bynens <mathias@qiwi.be> Co-authored-by: Mathias Bynens <mathias@qiwi.be> |
||
---|---|---|
.. | ||
common | ||
node | ||
.eslintrc.js | ||
api-docs-entry.ts | ||
environment.ts | ||
initialize-node.ts | ||
initialize-web.ts | ||
node-puppeteer-core.ts | ||
node.ts | ||
revisions.ts | ||
tsconfig.cjs.json | ||
tsconfig.esm.json | ||
web.ts |