GitHub new default Nodejs 16 will break deploy starting Nov 29, 2021
See original GitHub issueWhere to find the issue
Describe the issue
According to the announcements in https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-README.md “[all OSs] Default Nodejs version will be set to 16 on November, 29”
This will break the deployment of cwa-website unless measures are taken to lock the deployment to Nodejs 14.
Breaking changes
We are going to set Nodejs 16 as the default version across all VM images.
Target date
Image deployment is starting on November 29 and will take 3-4 days.
The motivation for the changes
Node.js 16 has moved to Active LTS status and is ready for general use. We would like to provide images with the latest stable updates as default ones.
Possible impact
If your builds depend on the default Nodejs 14 or npm 6 they can be broken.
Virtual environments affected
- Ubuntu 18.04
- Ubuntu 20.04
- macOS 10.15
- macOS 11
- Windows Server 2016
- Windows Server 2019
- Windows Server 2022
Mitigation ways
The recommended way is to pin your workflow to the desired nodejs version using:
Current setup
deploy-master.yml contains
runs-on: ubuntu-latest
run: npm install
run: npm run build
https://github.com/actions/virtual-environments defines ubuntu-latest
as Ubuntu 20.04 currently (Nov 18, 2021)
- Node 14.18.1
- Npm 6.14.15
Result of running on Nodejs 16
On Ubuntu 20.04.03
$ nvm use lts/gallium
Now using node v16.13.0 (npm v8.1.0)
The command
npm install
first updates package-lock.json
and after some deprecation messages it fails trying to install node-sass
.
https://github.com/sass/node-sass/releases/tag/v4.14.1 is required by https://www.npmjs.com/package/gulp-sass/v/4.1.1.
node-sass - v4.14.1 is supported up to Node 14, but not Node 16.
To solve that issue requires updating to gulp-sass v5 which introduces breaking changes.
Suggested change
- Short term - Follow the instructions in https://github.com/actions/setup-node to specify
node-version: '14'
orlts/fermium
in deploy-master.yml. - Long term - migrate the gulp build environment to run on
lts/gallium
(node v16.13.0 with npm v8.1.0). See also https://nodejs.org/en/about/releases/.
Issue Analytics
- State:
- Created 2 years ago
- Comments:14 (14 by maintainers)
Top GitHub Comments
I have added a new post https://github.com/corona-warn-app/cwa-website/issues/2155 concerning steps to migrate the cwa-website to Nodejs v16 (currently built using Nodejs v14).
Closing, since PR #2106 implements the suggestion in https://github.com/corona-warn-app/cwa-website/issues/2098#issuecomment-973145685 to modify deploy-master.yml so that it explicitly configures to use node-version: ‘
lts/fermium
’ (equivalent to node v14.18.1 according to https://nodejs.org/download/release/latest-fermium/).If there is any later migration to node 16, this should be covered in a separate issue.