question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

GitHub new default Nodejs 16 will break deploy starting Nov 29, 2021

See original GitHub issue

Where to find the issue

deploy-master.yml

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

  1. Short term - Follow the instructions in https://github.com/actions/setup-node to specify node-version: '14' or lts/fermium in deploy-master.yml.
  2. 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:closed
  • Created 2 years ago
  • Comments:14 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
MikeMcC399commented, Dec 4, 2021

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).

1reaction
MikeMcC399commented, Nov 22, 2021

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

GitHub new default Nodejs 16 may break build workflow #2142
According to the announcement ubuntu-latest it says "Image deployment is starting on November 29 and will take 3-4 days." ...
Read more >
All Actions will begin running on Node16 instead of Node12
We plan to migrate all actions to run on Node16 by Summer 2023. We will monitor the progress of the migration and listen...
Read more >
Node.js 16 available now
As a reminder — Node.js 12 will remain in long-term support until April 2022, and Node.js 14 will remain in long-term support until...
Read more >
i tried to Polyfill modules in webpack 5 but not working (Reactjs)
This What am using! Os: Win11 Node : v16 React:v17 React-script : v5 Webpack: ...
Read more >
Firebase JavaScript SDK Release Notes - Google
Updated firebase/[product] entry point bundles to conform to Node.js ES module ... such as the default production build for Create React App. See...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found