DEV Community

Cover image for Cypress Installation Self-Signed Certificate/ Proxy Issue
Evancodes
Evancodes

Posted on

Cypress Installation Self-Signed Certificate/ Proxy Issue

Recently when I was trying to install Cypress for my project, it was failed due to self-signed certificate or proxy issue as below:

Error while installing Cypress

I've tried to set the NODE_EXTRA_CA_CERTS to point to my certificate in local as environment variable but it's still not working.

After digging around the documentation, I found a way to solve this problem as below:-

1.Download the cypress zip file for the version you want to install from the official cypress website
Download Cypress zip file from Official Cypress Website

2.Set the CYPRESS_INSTALL_BINARY to the cypress zip location that you've downloaded at .npmrc or you can use npm set command to set the variable.

  • Set CYPRESS_INSTALL_BINARY in .npmrc
CYPRESS_INSTALL_BINARY=/path/to/cypress.zip
Enter fullscreen mode Exit fullscreen mode
  • Set CYPRESS_INSTALL_BINARY using npm
npm config set CYPRESS_INSTALL_BINARY /path/to/cypress.zip
Enter fullscreen mode Exit fullscreen mode

3.Use npm install command to install the cypress.Then it will install the downloaded cypress zip instead of downloading from the source.

  • Install cypress with npm
 npm install --save-dev cypress
Enter fullscreen mode Exit fullscreen mode

Thank you and see you next time :)

Top comments (0)