https://cypress.io logo
Will cypress 9.0.0 work with node 17+ versions? I ...
# i-need-help
r
I was using Cypress 9.0.0 with Node 16, but had to upgrade Node to 17+ for compliance. Now cypress is throwing plugin file error even for the default tests created by cypress. Any workaround is available?
h
I'm guessing you mean node 18 because 17 is neither LTS nor the most current - I think it's already EOL. Is there something preventing you from upgrading Cypress?
r
My application is working fine in Cypress 9.0.0, but with later versions, it displays blank screen at one page and couldnt get past it. So, I have to use either Cypress 9 or have to fix this blank screen issue
The application works fine in normal browser
h
Leaving aside that your time may be better spent trying to fix that blank screen issue and get Cypress upgraded - when you say "plugin error even for default tests," are you talking about the boilerplate tests that Cypress creates when you first configure it? Have you tried using Node 18 with a true fresh install of Cypress 9 with no plugins?
r
yes.. same issues
h
Like literally a blank project with no relation to your application's test suite?
r
yup
h
What do the errors look like?
r
let me get a screenshot
h
Can you post that test project's package.json and cypress config? I started using Cypress with v10 so I'm not super familiar with the <10 .json configs but maybe I can make heads or tails
r
that is literally fresh project
h
Yeah understood. And if you try the same with Cypress 10, it works?
And if you downgrade Node.js to 16 but leave Cypress at 9, it also works?
r
the same with Cypress 9.0 and Node 16 works
also works with Cypress 10 + and Node 16 or above works
h
Just for laughs I wanted to see this behavior myself. I used nvm to go to Node 18.13.0, made a new directory,
npm i -D cypress@9
, and launched it. Works fine for me.
All I did was: - nvm use 18 - npm init - npm i -D cypress@9 - npx cypress open
Copy code
% node --version
v18.13.0

% npm ls cypress
cypress-9-node-18
└── cypress@9.7.0
r
😩
thanks for your time bourg. let me try the same
can you try with 9.0.0
h
Trying now. Do you have the same issue preventing you from upgrading to >10 with >=9.1.0?
I do get the same error as you with 9.0.0
In fact, I just found the issue - https://github.com/cypress-io/cypress/issues/19712
It was fixed in Cypress 9.4.0
https://docs.cypress.io/guides/references/changelog#9-4-0 > Fixed regression in 9.2.1 where the --openssl-legacy-provider flag was not being passed to the plugins' child process when the user's system Node version was Node 17+ built with OpenSSL v3+ which resulted in Cypress crashing when trying to run tests. Fixes #19712.
Or actually, may have been this issue fixed in 9.1.1, not 100% sure. Looks like there was a lot of turbulence with Node 17+ in Cypress 9.X -
> When using the default configuration of "nodeVersion": "system" with an installed system node >=17, Cypress will now work properly rather than throw an error incorrectly pointing to the user's plugin file. Fixes #18914.
Found just by opening the changelog, searching for "node", and scanning through bugfixes in the 9.X range
I still think you should find the issue preventing you from upgrading to the latest version, but hopefully this gives some clarity at least
m
You might want to consider upgrading to the latest 9.x version, in other words 9.7.0. With the exception of a problem with wait-on, all v9 examples (https://github.com/cypress-io/github-action/tree/master/examples/v9) are working with Node.js 18 there.