Error while installing chromedriver in Jenkins

Viewed 21

I am getting this error while installing chromedriver in Linux.

When I run npm install chromedriver, I get this below error.

14:36:22 v14.18.1
14:36:22 + npm -v
14:36:23 6.14.15
14:36:23 + npm install chromedriver --chromedriver-force-download
14:37:18 
14:37:18 > chromedriver@105.0.0 install /tmp/Govind/vppautomationjs/node_modules/chromedriver
14:37:18 > node install.js
14:37:18 
14:37:18 npm WARN vppautomationjs@1.0.0 No repository field.
14:37:18 
14:37:18 npm ERR! code ELIFECYCLE
14:37:18 npm ERR! syscall spawn sh
14:37:18 npm ERR! file sh
14:37:18 npm ERR! path sh
14:37:18 npm ERR! errno -2
14:37:18 npm ERR! chromedriver@105.0.0 install: `node install.js`
14:37:18 npm ERR! spawn sh ENOENT
14:37:18 npm ERR! 
14:37:18 npm ERR! Failed at the chromedriver@105.0.0 install script.
14:37:18 npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Please help.

1 Answers

You can probably get it this way on your Jenkins machine. Change the version as needed. It's set to a version that doesn't have the compatibility check, so it won't complain if your version of Chrome doesn't match. But if you do know the version of Chrome that is on that Jenkins machine, use that.

wget https://chromedriver.storage.googleapis.com/72.0.3626.69/chromedriver_linux64.zip
unzip chromedriver_linux64.zip
chmod +x chromedriver
mv chromedriver /usr/local/bin/
Related