Skip to content

Installation fails on Amazon Linux 2

  • OS: Amazon Linux 2.0.20211005.0
  • Node: v10.24.1
  • NPM: 6.14.12

Tested with chromedriver: 91.0.1 and 96.0.0.

(optional) If you don't have access to an EC2 AWS VM, you can run Amazon Linux 2 inside Docker by doing the following:

$ docker pull amazonlinux:2.0.20211005.0
$ docker run -it amazonlinux:2.0.20211005.0 /bin/bash

Then within the Amazon Linux 2 VM (or Docker container) Chrome was pre-installed by running:

$ amazon-linux-extras install epel
$ yum -y --setopt=tsflags=nodocs install chromium

Trying to install chromedriver then fails with the following error message:

$ npm install chromedriver
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated fsevents@2.1.3: "Please update to latest v2.3 or v2.2"

> chromedriver@91.0.1 install /hsg-project/repos/hsg-shell/node_modules/chromedriver
> node install.js

Your Chrome version is 4430.212 Fedora Project
ChromeDriver installation failed TypeError: Cannot read property '1' of null
    at install (/hsg-project/repos/hsg-shell/node_modules/chromedriver/install.js:42:75)
    at process._tickCallback (internal/process/next_tick.js:68:7)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.2 (node_modules/@wdio/cli/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.1 (node_modules/mocha/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! chromedriver@91.0.1 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the chromedriver@91.0.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-11-30T12_30_01_911Z-debug.log

I also tried with --detect_chromedriver_version but it made no difference:

npm install chromedriver --detect_chromedriver_version