Windows 10环境下ZScaler Proxy安装Cypress失败及相关问题求助
Cypress安装与卸载问题(Windows 10 + ZScaler环境)
一、安装时的证书错误
在Windows 10(版本10.0.19044)搭配ZScaler Cloud Connector安装Cypress 10.7.0时,出现以下下载错误:
911 error 911 error Platform: win32-x64 (10.0.19044) 911 error Cypress Version: 10.7.0 912 error [FAILED] The Cypress App could not be downloaded. 912 error [FAILED] 912 error [FAILED] Does your workplace require a proxy to be used to access the Internet? If so, you must configure the HTTP_PROXY environment variable before downloading Cypress. Read more: https://on.cypress.io/proxy-configuration 912 error [FAILED] 912 error [FAILED] Otherwise, please check network connectivity and try again: 912 error [FAILED] 912 error [FAILED] ---------- 912 error [FAILED] 912 error [FAILED] URL: https://download.cypress.io/desktop/10.7.0?platform=win32&arch=x64 912 error [FAILED] Error: unable to get local issuer certificate 912 error [FAILED] 912 error [FAILED] ---------- 912 error [FAILED] 912 error [FAILED] Platform: win32-x64 (10.0.19044) 912 error [FAILED] Cypress Version: 10.7.0 913 verbose exit 1 914 timing npm Completed in 11016ms 915 verbose unfinished npm timer reify 1661966146931 916 verbose unfinished npm timer reify:build 1661966156229 917 verbose unfinished npm timer build 1661966156230 918 verbose unfinished npm timer build:deps 1661966156230 919 verbose unfinished npm timer build:run:postinstall 1661966156255 920 verbose unfinished npm timer build:run:postinstall:node_modules/cypress 1661966156255 921 verbose code 1 922 error A complete log of this run can be found in: 922 error C:\Users\eric\AppData\Local\npm-cache\_logs\2022-08-31T17_15_46_738Z-debug-0.log
已尝试操作:
- 设置HTTP_PROXY环境变量,值与代理脚本地址一致:
C:\Windows\system32>echo %HTTP_PROXY% http://127.0.0.1:9000/systemproxy-9a8d7abc.pac - 重启PowerShell后重新安装,错误依旧
- 临时关闭ZScaler服务,问题未解决
二、本地二进制包安装的局限性
参考方案找到临时解决办法:在cmd中执行以下命令可成功安装:
set CYPRESS_INSTALL_BINARY=C:\Users\eric\Downloads\cypress.zip npm install cypress --save-dev
但存在以下问题:
- 在PowerShell中设置CYPRESS_INSTALL_BINARY后,该变量未出现在环境列表中,无法生效
- cmd不识别
~路径,必须使用绝对路径
三、Cypress未完全卸载的问题
需要安装旧版本Cypress,执行npm uninstall cypress后,运行npx cypress run仍提示存在cypress.json文件(Cypress 10.0.0及以上版本不再支持该文件),说明卸载不彻底,需解决该问题。
内容的提问来源于stack exchange,提问作者Eric
相关产品推荐
相关产品推荐

