-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrading to v12.17.4 broken node 17 support #27589
Comments
Hi @MCFreddie777 . Thank you for opening an issue. The issue you are experiencing is a Webpack 4 compatibility issue with Node 17 and above. Cypress was previously working around this by setting
The first option should be suitable to get things up and running as a workaround until you are able to update to webpack 5. I have a few details in the pull request, which is a bit wordy and don't expect anyone to read, but there is a snippet in there I do want to share for reference for other users who might run into this issue.
|
If this can be a breaking change for some users like me, shouldn't this be
a major version update , respecting the semantic versioning?
Due to complications with other packages I'm unable to update webpack as it
is pure esm package and not all of my packages are esm.
…On Fri, 18 Aug 2023 at 4:23 PM, Bill Glesias ***@***.***> wrote:
Hi @MCFreddie777 <https://github.com/MCFreddie777> . Thank you for
opening an issue. The issue you are experiencing is a Webpack 4 compatibility
issue <webpack/webpack#14532> with Node 17 and
above. Cypress was previously working around this by setting
NODE_OPTIONS=--openssl-legacy-provider in the node process for users with
node versions above 16. To resolve this on your end, there are a few
options you can explore.
- set NODE_OPTIONS=--openssl-legacy-provider with node 17 and above
when invoking cypress which will allow your node process to work with
webpack 4 (ex: NODE_OPTIONS=--openssl-legacy-provider npx cypress open)
- update to webpack 5. The @cypress/webpack-preprocessor is backwards
compatible between Webpack 4 and 5, so it just uses the installed version.
I don't know how complex your actual preprocessor setup/webpack setup is
(if your app is using the same version in a repo), but based on the
reproduction provided this should be a simple bump from 4.46.0 to
5.88.2.
- downgrade to Node 16 as node 16 uses the older ssl provider by
default, which is going EOL on September 11th, 2023
<https://nodejs.org/en/blog/announcements/nodejs16-eol> (not
recommended).
The first option should be suitable to get things up and running as a
workaround until you are able to update to webpack 5. I have a few details
in the pull request
<webpack/webpack#14532 (comment)>,
which is a bit wordy and don't expect anyone to read, but there is a
snippet in there I do want to share for reference for other users who might
run into this issue.
If users are using the file:preprocessor hook inside plugins, users can
still use ***@***.*** still and will not be broken, even though cypress is
bundled with webpack 5. The only stipulation to continuing using ***@***.***
is that users remain on Node 16 as ***@***.*** has this issue that will not
be backpatched
<webpack/webpack#14532 (comment)>
from webpack. We recommend users upgrade to recent versions of webpack and
node, as Node 16 will be EOL in Q3 of 2023
<https://nodejs.org/en/blog/announcements/nodejs16-eol>
—
Reply to this email directly, view it on GitHub
<#27589 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGUUGG665UOA6EGNNAX6NILXV53FFANCNFSM6AAAAAA3VNC63A>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
AFAIK you can update webpack without being entirely on ESM, as we were in a similar boat. But the upgrade is definitely a large lift and I can understand that it isn't something that can be accomplished easily. It was definitely a large lift for us and is the main reason it took us years to upgrade.
We had extensive conversations internally on whether we wanted to consider this update a breaking change, and opted not to due to the rare likelihood of complications likely contained to a small subset of users with workarounds readily available. In addition to Cypress That being said, if updating webpack is not an option, leveraging That being said, providing |
Still, according to semver methodology, this should not be released as a "hotfix". Definitely not a hotfix, rather then a new feature. |
I don't know if I agree as Cypress has considered the possibilities extensively and used our best judgement accordingly, which is in alignment with semver's FAQ and practices. At least to us, this doesn't seem like a new feature of the product, rather a dependency update with possible rare side effects depending on the user and would highly unlikely affect a significant population of our users. Regardless, I want to make sure that you are able to continue running Cypress and that the workarounds provided are sufficient to help resolve your issue. |
Agree here - We are on Webpack 5, and this "patch" broke things for us also. Error Details
|
@khitrenovich this looks related to webpack but a separate problem. Would you be able to open an issue and provide a reproduction for the issue you are facing? |
Sure, I'll try to spend some time on that next week. Regardless, my main point was about versioning. |
@khitrenovich #27599 looks to be the issue you are describing, which I am working on investigating this morning. The issue I am linking looks to be an unintended break from the update. |
Unfortunately we have to close this issue due to inactivity. I believe this issue is solved and has a reasonable workaround. Please comment if there is new information to provide concerning the original issue and we can reopen. |
Hi, when I updated to Node V20.9.0 my scripts are failing. Right side pane after launching browser is not visible. The web page is blank and scripts couldn't detect web elements, hence failing. Any solution, I have been trying to fix it for 2 days now. Any help is appreciated. |
@poreddybindusarika are you able to open a separate issue with a reproduction of the problem? |
Current behavior
After recent upgrade to v12.17.4, which contains related changes to webpack@5, on node 17, cypress fails with following:
I am still using webpack v4 preprocessor (
plugins/index.ts
):Therefore, I have manually babel & webpack dependencies installed. With these dependencies explicitly defined in package.json, it fails.
Desired behavior
If you check out to 12-17-3 branch, everything works fine and the tests pass.
Test code to reproduce
The code is available here: https://github.com/MCFreddie777/cypress-12-17-4
Cypress Version
12.17.4
Node version
v18.4
Operating System
macOS 13.4.1
Debug Logs
No response
Other
No response
The text was updated successfully, but these errors were encountered: