karma
karma copied to clipboard
Cypress - Error: certificate has expired in existing project
Hi Team,
As we are using old versions of cypress and trying to upgrade it.
Angular 11: Cypress: 4.12.1 Node 14.20.0 in local and 16.20.0 in Azure pipeline.
We are getting below certificate issues in the pipeline, but not locally.
npm ERR! code 1 npm ERR! path C:\a\9\s\node_modules\cypress npm ERR! command failed npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node index.js --exec install npm ERR! Installing Cypress (version: 4.2.0) npm ERR! npm ERR! 25l[09:10:23] Downloading Cypress [started] npm ERR! [09:10:23] Downloading Cypress [failed] npm ERR! 25hThe Cypress App could not be downloaded. npm ERR! npm ERR! 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 npm ERR! npm ERR! Otherwise, please check network connectivity and try again: npm ERR! npm ERR! ---------- npm ERR! npm ERR! URL: https://download.cypress.io/desktop/4.2.0?platform=win32&arch=x64 npm ERR! Error: certificate has expired npm ERR! npm ERR! ---------- npm ERR! npm ERR! Platform: win32 (10.0.20348) npm ERR! Cypress Version: 4.2.0 npm ERR! 25h
Also, I tried to upgrade the Cypress version from 4.12.1 to 5/6/7/8.. latest. It throws different issue as
[email protected] postinstall C:\Users\node_modules\cypress node index.js --exec install
C:\Users\node_modules\cypress\node_modules\is-installed-globally\index.js:12 } catch { ^
SyntaxError: Unexpected token {
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:617:28)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: node index.js --exec install
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Please suggest any solution
I can successfully install in new Angular 11 project. It Occurs only in existing project
Now I get the same type of cypress error but different in package
Cypress: 5.x node:16.20.1 npm: 8.19.1
verbose stack Error: command failed
7700 verbose stack at ChildProcess.