log:
> [email protected] install /Users/Jason/Documents/vue-router/node_modules/chromedriver
> node install.js
Downloading http://chromedriver.storage.googleapis.com/2.16/chromedriver_mac32.zip
Saving to /var/folders/_1/4khr45254mbfbn7k7fvmbkk80000gn/T/chromedriver/chromedriver_mac32.zip
Receiving...
ChromeDriver installation failed undefined
npm ERR! Darwin 15.0.0
npm ERR! argv "/usr/local/Cellar/node/0.12.2_1/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v5.0.0
npm ERR! npm v3.4.1
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node install.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the chromedriver package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node install.js
npm ERR! You can get their info via:
npm ERR! npm owner ls chromedriver
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/Jason/Documents/vue-router/npm-debug.log
Most likely chromedriver is incompatible with Node 5. Try 4.2.2 instead.
请问您这个问题是怎么解决的
According to the install.js, the script downloads the chromediriver binary via http.get.
But the zip file has been moved and the situation is not handled by the script.
curl -I http://chromedriver.storage.googleapis.com/2.21/chromedriver_mac32.zip
HTTP/1.1 302 Found
Connection: close
Location: http://101.44.1.11/files/1068000004E980C8/chromedriver.storage.googleapis.com/2.21/chromedriver_mac32.zip
Fix it by running:
npm install chromedriver --chromedriver_cdnurl=http://cdn.npm.taobao.org/dist/chromedriver
@KingMario thanks
Downloading http://npm.taobao.org/mirrors/chromedriver/2.24/chromedriver_win32.zip
Saving to C:UsersasktalkAppDataLocalTempchromedriverchromedriver_win32.zip
Receiving...
ChromeDriver installation failed undefined
npm info lifecycle [email protected]~install: Failed to exec install script
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "D:2.enviroment_domain2.nodejs.envnode.exe" "D:2.enviroment_domain2.nodejs.envnode_modulesnpmbinnpm-cli.js" "install" "chromedriver" "--chromedriver_cdnurl=http://cdn.npm.taobao.org/dist/chromedriver" "-g"
npm ERR! node v6.6.0
npm ERR! npm v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: node install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node install.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the chromedriver package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node install.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs chromedriver
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls chromedriver
npm ERR! There is likely additional logging output above.
@KingMario
Hi,
The topic is already closed, however, I want to share with you steps I did to resolve this issue. Hope it helps someone whos still struggling with it.
https://chromedriver.storage.googleapis.com/2.20/chromedriver_win32.zipnpm install chromedriver --chromedriver_filepath=/path/to/chromedriver.zipchromedriver_filepath=/path/to/chromedriver.zip (optional)chromeDriver: './node_modules/chromedriver/lib/chromedriver/chromedriver.exe'Work at least on my end 😄
npm install chromedriver --chromedriver_cdnurl=http://cdn.npm.taobao.org/dist/chromedriver
@tomaszczechowski can you tell me where is the .npmsrc file?
if you don't have it, just create it in the same flles level as a package.json is.
ok, thank you! i have resolved this problem. but i still have a question.when i write
""chromedriver_filepath=C:/Users/user/AppData/Local/Temp/chromedriver/chromedriver_win32.zip"" in the .npmrc file,then next time , if you run npm install chromedriver , it will find this module in "C:/Users/user/AppData/Local/Temp/chromedriver/chromedriver_win32.zip" this place, right?? but it doesn't work, it still downloads from "https://chromedriver.storage.googleapis.com/2.35/chromedriver_win32.zip" this url,i feel confused.
Most helpful comment
According to the install.js, the script downloads the chromediriver binary via http.get.
But the zip file has been moved and the situation is not handled by the script.
Fix it by running: