Open thw0rted opened 3 years ago
Since I posted this, my CI build has started installing chromedriver v89. I'm still pinned at Puppeteer 5.5.0, so it's still installing Chromium 88 locally. I don't know what changed to break this, and I'm not sure how to fix it.
I currently depend on
webdriver-manager
via Protractor. I run e2e tests in CI by using Puppeteer to install a headless Chromium, then point Protractor at the installed binary usingrequire("puppeteer").executablePath()
. It's easy and works well.Today, I updated a bunch of dependencies to their latest versions, including Protractor and Puppeteer. NPM didn't complain, but when I tried to run tests, I got an error along the lines of
Of course this makes sense because the latest Puppeteer (7.0.4) installs Chromium 90 while the latest Protractor (7.0.0) installs webdriver-manager 12.1.8 which seems to support up through Chromium 88. So, I had to roll back to Puppeteer 5.5.0, which installs the matching Chromium.
Each version of Puppeteer installs a specific build of Chromium. So, indirectly, the version of Puppeteer that should be installed is dictated by the version of webdriver-manager that's installed (which is dictated by the version of Protractor). What I'm asking for is a way to get
npm
to install the correct version of Puppeteer based on my declared Protractor (and, thus, webdriver-manager) dependency. I think this would be a good fit foroptionalPeerDependencies
, which doesn't actually exist yet, but maybe there's another (supported) way to do it?