当我试图在Windows 10计算机上安装带有Zscaler连接器的Cypress时,我会得到以下错误:
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我遵循https://on.cypress.io/proxy-configuration的建议,并设置了HTTP_PROXY环境变量,以匹配代理设置的脚本地址中显示的内容。(此处显示在cmd提示符中):
C:\Windows\system32>echo %HTTP_PROXY%
http://127.0.0.1:9000/systemproxy-9a8d7abc.pac在设置了环境变量之后,我尝试使用一个新的Power提示符安装柏树,以防我的旧Power提示符有一个陈旧的环境。
然而,我仍然会遇到同样的错误。在Zscaler设置中,我曾尝试暂时关闭服务状态,但仍然失败时出现了相同的错误。
我能够根据这里的说明想出一个解决办法:while installing cypress through command :npm install cypress --save-dev getting error as The Cypress App could not be downloaded
在cmd,我运行了:
set CYPRESS_INSTALL_BINARY=C:\Users\eric\Downloads\cypress.zip其次是:
npm install cypress --save-dev我试着用动力壳来做,但是如果我运行了一个:
set CYPRESS_INSTALL_BINARY=~/Downloads/cypress.zip
dir env:它不会在我的环境中向我展示CYPRESS_INSTALL_BINARY。
请注意,我必须切换到cmd中的绝对路径,因为它不理解~
然后我意识到我需要一个老版本的柏树,所以我试着做了一个:
npm uninstall cypress
up to date, audited 509 packages in 970ms
62 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities但是它似乎还没有完全卸载,因为我看到了:
c:\MyPath>npx cypress run
There is a cypress.json file at the path: c:\MyPath
Cypress version 10.0.0 no longer supports cypress.json.
Please run cypress open to launch the migration tool to migrate to cypress.config.{js,ts,mjs,cjs}.
https://on.cypress.io/migration-guide发布于 2022-09-01 13:07:52
我意识到,尽管npm柏树卸载似乎是有效的。我仍然在C:\Users\eric\AppData\Local\Cypress目录中保留了文件。在从https://download.cypress.io/desktop/9.6.1下载后,我删除了这些文件并重新安装了cypress 9.6.1
set CYPRESS_INSTALL_BINARY=C:\Users\eric\Downloads\cypress_old.zip然后是一个
npm install cypress我还能跑
npx cypress run如果没有它的话
Cypress version 10.0.0 no longer supports cypress.json.https://stackoverflow.com/questions/73559911
复制相似问题