Problem:
Users are getting an error during installation of cypress in Cor-porate environment with npm install
. The error looks like this:
The Cypress App could not be downloaded.
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
Otherwise, please check network connectivity and try again:
----------
URL: https://download.cypress.io/desktop/3.8.2?platform=darwin&arch=x64
Error: self signed certificate in certificate chain
----------
Platform: darwin (18.7.0)
Cypress Version: 3.8.2
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! cypress@3.8.2 postinstall: `node index.js --exec install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the cypress@3.8.2 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Solution:
You have to set a variable to disable proxy check. Run the following command or set it in your bash_profile
:
export NODE_TLS_REJECT_UNAUTHORIZED='0'