When I'm trying to install Cypress with the Zscaler Cloud Connector on a Windows 10 machine, I get the following error:
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
I followed the suggestions at https://on.cypress.io/proxy-configuration and set the HTTP_PROXY environment variable to match what's displayed in the Script address of the Proxy Settings. (Here it is displayed in a cmd prompt):
C:\Windows\system32>echo %HTTP_PROXY%
http://127.0.0.1:9000/systemproxy-9a8d7abc.pac
I've tried installing cypress using a new Power Shell prompt after setting the environment variable, in case my old Power Shell prompt had a stale environment.
However, I still get the same error. In the Zscaler settings I've tried temporarily turning off the Service Status, but it still fails with the same error.
I was able to come up with a workaround based on the instructions here: while installing cypress through command:npm install cypress --save-dev getting error as The Cypress App could not be downloaded
In cmd I ran:
set CYPRESS_INSTALL_BINARY=C:\Users\eric\Downloads\cypress.zip
followed by:
npm install cypress --save-dev
I tried doing it in power shell, but if I ran a:
set CYPRESS_INSTALL_BINARY=~/Downloads/cypress.zip
dir env:
It wouldn't show me the CYPRESS_INSTALL_BINARY in my environment.
Note that I had to switch to an absolute path in cmd, because it didn't understand ~
I then realized that I needed an older version of cypress, so I tried doing a:
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
but it doesn't seem to have fully uninstalled, because I see:
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
I realized that although the npm cypress uninstall appeared to have worked. I still had files left in the C:\Users\eric\AppData\Local\Cypress directory. I deleted these files and reinstalled cypress 9.6.1 after downloading it from https://download.cypress.io/desktop/9.6.1 Doing a
set CYPRESS_INSTALL_BINARY=C:\Users\eric\Downloads\cypress_old.zip
and then a
npm install cypress
and I was able to run
npx cypress run
without it complaing that
Cypress version 10.0.0 no longer supports cypress.json.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.