问题
I am trying to install cypress to my Angular 8 project.
But when I try to install, I am getting the same error over and over again.
I've added the proxy in my environment variables and also in my .npmrc file. Those are the proxy variables I have found on the company's wiki. But I'am still getting the same error.
Does anyone knows what I am doing wrong here?
回答1:
Please set up below environment variables before installing through command line.
set HTTPS_PROXY=http://domain%5Cusername:password@proxy:80
set HTTP_PROXY=http://domain%5Cusername:password@proxy:80
Also, set below proxy values for npm
npm config set proxy http://domain%5Cusername:password@proxy:80
npm config set http-proxy http://domain%5Cusername:password@proxy:80
Also, ensure you are using the correct url for the proxy server.
Cheers!
回答2:
The solution that worked for me is setting the CYPRESS_INSTALL_BINARY variable to a local zip folder.
I know this will not work in Azure DevOps, but maybe the install works in the build pipeline.
This is something I have to test.
Update
The install works on Azure DevOps.
来源:https://stackoverflow.com/questions/60379393/cypress-installation-fails-with-proxy-setup