On Windows, I am trying to update ChromeDriver to take advantage of the new headless option for Chrome. However, ChromeDriver reverts back to a previous version as soon as the update is complete.
In the console log from command prompt below, you can see that I downloaded version 2.33, but at the end, the version I get is 2.27. I need at least 2.29 to use headless Chrome.
C:\WINDOWS\system32>npm uninstall chromedriver
- [email protected] node_modules\globby\node_modules\pify
- [email protected] node_modules\globby
- [email protected] node_modules\isarray
- [email protected] node_modules\minimist
- [email protected] node_modules\extract-zip\node_modules\mkdirp
- [email protected] node_modules\ms
- [email protected] node_modules\debug
- [email protected] node_modules\p-map
- [email protected] node_modules\pend
- [email protected] node_modules\fd-slicer
- [email protected] node_modules\pify
- [email protected] node_modules\process-nextick-args
- [email protected] node_modules\string_decoder
- [email protected] node_modules\typedarray
- [email protected] node_modules\util-deprecate
- [email protected] node_modules\readable-stream
- [email protected] node_modules\concat-stream
- [email protected] node_modules\yauzl
- [email protected] node_modules\del
- [email protected] node_modules\extract-zip
- [email protected] node_modules\kew
- [email protected] node_modules\mkdirp
- [email protected] node_modules\chromedriver
npm WARN enoent ENOENT: no such file or directory, open 'C:\WINDOWS\system32\package.json'
npm WARN system32 No description
npm WARN system32 No repository field.
npm WARN system32 No README data
npm WARN system32 No license field.
C:\WINDOWS\system32>npm install chromedriver
> [email protected] install C:\WINDOWS\system32\node_modules\chromedriver
> node install.js
Downloading https://chromedriver.storage.googleapis.com/2.33/chromedriver_win32.zip
Saving to C:\Users\vadmin\AppData\Local\Temp\chromedriver\chromedriver_win32.zip
Received 781K...
Received 1568K...
Received 2352K...
Received 3136K...
Received 3920K...
Received 4125K total.
Extracting zip contents
Copying to target path C:\WINDOWS\system32\node_modules\chromedriver\lib\chromedriver
Done. ChromeDriver binary available at C:\WINDOWS\system32\node_modules\chromedriver\lib\chromedriver\chromedriver.exe
C:\WINDOWS\system32
`-- [email protected]
+-- [email protected]
| +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| `-- [email protected]
+-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | | +-- [email protected]
| | | +-- [email protected]
| | | +-- [email protected]
| | | `-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| `-- [email protected]
| `-- [email protected]
| `-- [email protected]
+-- [email protected]
`-- [email protected]
`-- [email protected]
npm WARN enoent ENOENT: no such file or directory, open 'C:\WINDOWS\system32\package.json'
npm WARN system32 No description
npm WARN system32 No repository field.
npm WARN system32 No README data
npm WARN system32 No license field.
C:\WINDOWS\system32>npm update chromedriver
C:\WINDOWS\system32>chromedriver -version
ChromeDriver 2.27.440174 (e97a722caafc2d3a8b807ee115bfb307f7d2cfd9)
C:\WINDOWS\system32>
What am I doing wrong/missing?
Most probably you have another chromedriver in your PATH. You can use PATH
command in cmd prompt to check if you have another chromedriver in your path. If you have another chromedriver you can either update it manually by downloading the version you want or you can add the one installed by npm
to your PATH
, which is at following location:
C:\WINDOWS\system32\node_modules\chromedriver\lib\chromedriver
Also, you can check the version of the chromedriver at the above location
C:\WINDOWS\system32>C:\WINDOWS\system32\node_modules\chromedriver\lib\chromedriver --version