[vtadmin-web] Upgrade to node v16.13.0 LTS #9136
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
🎃 This PR should be squash-merged.
tl;dr: This upgrades vtadmin-web to use node v16.13.0, which is the LTS as of October 26th, 2021. It also upgrades node-sass (by replacing with sass) and react-scripts to their latest versions.
Long version! This upgrades node to current LTS.
The node upgrade unearthed build errors with node-sass, which ended up being an unpleasant rathole of dependencies until I came across the fix mentioned in facebook/create-react-app#11037 (comment); namely, to switch from node-sass (which is now deprecated) to sass (a.k.a. "Dart Sass"). We use the SASS dependencies for building the
*.scss
files as described in the create-react-app docs, though it seems that page is out-of-date + still mentions the node-sass library.I also upgraded react-scripts since it's supposedly required for that node-sass -> sass swap (although it seemed to work fine without it).
There was only one breaking change to address, which is to update *.scss files using the
/
division operator to use math.div instead, as described here.The package-lock.json diff is +24,000 lines, which is.... chonky. Since upgrading to node v16.13.0 implicitly upgrades to npm v8.1.0, we have to go through the npm v7.x lockfile backwards-compatibility rigamarole described in the package-lock.json documentation.
For anyone running vtadmin-web locally:
node --version
.node:16.3.0
docker image is recommended.node_modules
. npm is supposed to be "self healing", but deletingnode_modules
before runningnpm i
(ornpm ci
) is not a bad idea. :)Related Issue(s)
N/A
Checklist
Deployment Notes
It's strongly recommended to build and run vtadmin-web with node v16.13.0. That said, node is "mostly backwards compatible". I've verified that vtadmin-web builds and runs with both node v12.22.7 and node v14.15.3.
If running vtadmin-web in Docker, then the
node:16.3.0
docker image is recommended.(cc @askdba, please let me know if you'd like more information for the release notes.)