Migrate to Node.js 18 Active LTS version
See original GitHub issueCurrent Implementation
cwa-website workflows currently specify Node.js 16 (lts/gallium) in
Status change in Node.js releases
As Node.js 16 with codename ‘Gallium’ moved from status Active LTS to Maintenance on October 25, 2022, Node.js 18 with codename ‘Hydrogen’ moved at the same time to status Active LTS. LTS means Long Term Support and the Node.js Release schedule explains in detail about the available Node.js versions and their status.
Suggested Enhancement
Update workflows to use Node.js 18 (‘Hydrogen’). This is currently shown on https://nodejs.org/en/ as 18.12.0 LTS “Recommended For Most Users”.
Notes:
- GitHub’s actions/setup-node allows using Node.js 18 although it is not yet cached into the Ubtuntu 20.04 runner
npm package webpack must be updated from version 4 to 5 otherwisenpm run build
produces the error “Error: error:0308010C:digital envelope routines::unsupported”npm package webpack-stream must be updated from version 5 to at least version 6 in combination with the webpack update to v5, otherwise the FAQ redirects do not work. v7 is the latest version and this also works with webpack v5.
Steps to migrate
- Workflow: change
node-version:
from'lts/gallium'
to'lts/hydrogen'
- npm packages:
Update webpack from version 4.46.0 to 5.74.0 (latest).Update webpack-stream from 5.2.1 to 7.0.0 (latest)- Edit: the above two packages were already updated by PR https://github.com/corona-warn-app/cwa-website/pull/3183
- Update README: Requirements to refer to Node.js 18
Expected Benefits
-
Align to the preferred Long Term Support version of Node.js (see Node.js 18).
-
Reduce number of vulnerabilities from 37 to 34 due to necessary npm package updates
Edit: Not relevant if no new npm packages are installed.
Internal Tracking ID: EXPOSUREAPP-14247
Issue Analytics
- State:
- Created a year ago
- Comments:5 (5 by maintainers)
Top GitHub Comments
@MikeMcC399 Also here, thanks a lot for providing a PR!
@dsarkar
My pleasure!