Cypress installation fails with Proxy setup

落花浮王杯 提交于 2020-04-17 21:59:11

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!