gpt4 book ai didi

npm - Chrome 驱动器安装在代理后面失败

转载 作者:行者123 更新时间:2023-12-02 20:48:30 27 4
gpt4 key购买 nike

我正在尝试使用 npm 安装 chromedriver,并且我支持我的公司代理。我看到以下错误。

这就是我到目前为止所做的

  1. 我已经将代理配置设置为npm 配置集代理 http://proxy.na.xxxxx.com:8080npm 配置集代理 http://proxy.na.xxxxx.com

  2. 我已清除缓存npm 配置删除代理

  3. npm install chromedriver --ignore_ssl

他们都没有帮助


ChromeDriver installation failed Error with http request: { 'cache-control': 'no-cache',
pragma: 'no-cache',
'content-type': 'text/html; charset=utf-8',
'proxy-connection': 'close',
connection: 'close',
'content-length': '727' }
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="096f7a6c7f6c677d7a493827382738" rel="noreferrer noopener nofollow">[email protected]</a>: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="abc6c2c5c4d886c8cad9d9c2ced9eb98859a859b" rel="noreferrer noopener nofollow">[email protected]</a> No license field.
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\#####\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "chromedriver"
npm ERR! node v6.9.2
npm ERR! npm v4.0.5
npm ERR! code ELIFECYCLE

npm ERR! <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="94f7fce6fbf9f1f0e6fde2f1e6d4a6baa6acbaa4" rel="noreferrer noopener nofollow">[email protected]</a> install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="412229332e2c2425332837243301736f73796f71" rel="noreferrer noopener nofollow">[email protected]</a> 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 install <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="95f6fde7faf8f0f1e7fce3f0e7d5a7bba7acbba5" rel="noreferrer noopener nofollow">[email protected]</a> --chromedriver-cdnurl=http://chromedriver.storage.googleapis.com

带有 http(而不是 https)的模块特定 cdnurl 选项 (chromedriver-cdnurl) 将解决某些公司代理环境中严重的 ca 认证检查问题。

关于npm - Chrome 驱动器安装在代理后面失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43241758/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com