Cypress binary download request using cafile
unnecessarily
#30064
Labels
topic: installation
Issue during installation or downloading Cypress
type: enhancement
Requested enhancement of existing feature
Current behavior
Starting from
11.0.0
Cypress uses thecafile
value defined in.npmrc
which I guess is a sane default but I have a unique use case where I need to download my npm packages through Artifactory but there is no repository in Artifactory for the binaries so Cypress is requesting binaries fromhttps://download.cypress.io
with the ca when attempting to install>=11.0.0
which results in anunable to get local issuer certificate
error.The only way I could get around this was to set
CYPRESS_INSTALL_BINARY=0
in my.npmrc
and then add a"cypress:install": "CYPRESS_INSTALL_BINARY=11.0.0 npm_config_cafile='./non/existent/path.pem' cypress install",
script to mypackage.json
and call this before every other cypress script, e.g.,cypress:run
,cypress:watch
.Setting
npm_config_cafile
to a non-existent path seems to be the only way to force the binary request to not use the cafile config.Alternatively I could add a proxy for the download that would accept the cafile but I don't want to throw infrastructure at what should be a configuration issue.
Would it be possible to add a unique environment variable to explicitly toggle ca usage? Maybe a
CYPRESS_CAFILE
that would take priority overnpm_config_cafile
and could be set to0
to disable ca usage altogether?Debug logs
Cypress Version
11.0.0
Node version
18.12.0
Package Manager
yarn
Package Manager Version
1.22.19
Operating system
Mac
Operating System Version
14.5
Other
No response
The text was updated successfully, but these errors were encountered: