-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
fix: Add support for system node 17 #19094
Conversation
Thanks for taking the time to open a PR!
|
Test summaryRun details
View run in Cypress Dashboard ➡️ This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
// To be removed on update to webpack >= 5.61, which no longer relies on | ||
// node's builtin crypto.hash function. | ||
if (semver.satisfies(config.resolvedNodeVersion, '>=17.0.0')) { | ||
childOptions.env.NODE_OPTIONS += ' --openssl-legacy-provider' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it possible for users to bring their own version of webpack?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If so, could we check to see if they're using our version or theirs before adding the option?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually i'm not sure that really matters, this is probably fine
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe that while they can bring their own webpack config, but not version. And if I'm wrong and they can, it should still be harmless to add the arg.
For me, Cypress 9.1.1 fails on macOS Monterey on a M1 with:
Is this a regression of this PR? |
User facing changelog
When using the default configuratation 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.Additional details
Previously, users could work around this by setting
NODE_OPTIONS=--openssl-legacy-provider
. We now apply this workaround by default when detecting system node version 17.How has the user experience changed?
This error no longer occurs when attempting to run spec files. It incorrectly points to the user's plugin file as the cause, while this was actually a bug with Cypress' bundled webpack.
PR Tasks
cypress-documentation
? N/Atype definitions
? N/Acypress.schema.json
? N/A