-
Notifications
You must be signed in to change notification settings - Fork 250
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
build(deps): upgrade node to 18.13.0 #6018
Conversation
matt-boris
commented
Jan 30, 2023
d04eb18
to
c03e061
Compare
@@ -9,8 +9,8 @@ | |||
|
|||
[build.environment] | |||
YARN_FLAGS = "--frozen-lockfile" | |||
YARN_VERSION = "1.22.4" | |||
NODE_VERSION = "16.19.0" | |||
YARN_VERSION = "1.22.19" |
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.
Missed this in #5586.
cb8ed2c
to
96a3158
Compare
"build": "export NODE_OPTIONS=--openssl-legacy-provider && webpack --mode production", | ||
"start": "export NODE_OPTIONS=--openssl-legacy-provider && cross-env GENERATE_ENV_JS=1 webpack-dev-server --mode development", | ||
"start:docker": "export NODE_OPTIONS=--openssl-legacy-provider && cross-env GENERATE_ENV_JS=1 webpack-dev-server --host 0.0.0.0 --disable-host-check --hot --mode development", |
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.
Since Node.js v17, it now supports OpenSSL v3.0, which brings tightened restrictions on the allowed algorithms and key sizes. Because we can't upgrade webpack to the latest version (Neutrino doesn't support), we need to use the legacy provider to avoid the ERR_OSSL_EVP_UNSUPPORTED error.
96a3158
to
ea223c3
Compare
ea223c3
to
6f53601
Compare
@@ -179,7 +179,7 @@ | |||
"release": "node infrastructure/tooling/src/main.js release", | |||
"staging-release": "node infrastructure/tooling/src/main.js staging-release", | |||
"release:publish": "node infrastructure/tooling/src/main.js release:publish", | |||
"generate": "node infrastructure/tooling/src/main.js generate", | |||
"generate": "export NODE_OPTIONS=--dns-result-order=ipv4first && node infrastructure/tooling/src/main.js generate", |
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.
Since Node.js v17, the DNS result order is returned how the resolver sent the list PR. This breaks some of our testing/infra scripts because IPv6 localhosts are now returned instead of IPv4.
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.
Instead of interfering with DNS order returned by the operating system, it's probably better to make use of Happy Eyeballs*, which was finally implemented in Node v18. EDIT: Unfortunately the folllowing option is only available in 19.4 for now :(
"generate": "export NODE_OPTIONS=--dns-result-order=ipv4first && node infrastructure/tooling/src/main.js generate", | |
"generate": "export NODE_OPTIONS=--enable-network-family-autoselection && node infrastructure/tooling/src/main.js generate", |
*Happy Eyeballs is used by every web browser around (Chrome, Firefox, Opera, Internet Explorer, ...). It also solves issues in round-robin cases where one returned IP address isn't accessible.
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.
Awesome, thanks for this note @treysis!
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.
@treysis it seems like this command line option is not available yet in v18:
/usr/local/bin/node: --enable-network-family-autoselection is not allowed in NODE_OPTIONS
https://nodejs.org/api/cli.html#--enable-network-family-autoselection
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'll likely just revert to what we had and will come back to this if/when that CLI option is backported to v18.
@treysis do you happen to know if that's on the roadmap? I looked through some open issues/PRs and wasn't able to tell for sure.
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.
Oops. No idea how I overlooked that. I was sure the cli option made it into 18.13. Apparently it's just the general support for Happy Eyeballs that made it into 18.13. It requires to set the option autoSelectFamily=true
for each net
-call separately.
Yes, it's a bit confusing. Seems to depend on nodejs/node#45994 to make it into 18.x. It's worked on. So fingers crossed!
@@ -10,7 +10,7 @@ | |||
], | |||
"scripts": { | |||
"lint": "eslint src/*.js test/*.js", | |||
"test": "karma start --single-run" | |||
"test": "export NODE_OPTIONS=--openssl-legacy-provider && karma start --single-run" |
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.
Since Node.js v17, it now supports OpenSSL v3.0, which brings tightened restrictions on the allowed algorithms and key sizes. Because we can't upgrade webpack to the latest version (Neutrino doesn't support), we need to use the legacy provider to avoid the ERR_OSSL_EVP_UNSUPPORTED error.
7089309
to
6f53601
Compare
6f53601
to
5e5d5dd
Compare