corona-warn-app / cwa-event-landingpage

Small event landing page for new CWA users when using the native camera. The CWA development ends on May 31, 2023. You still can warn other users until April 30, 2023. More information:
https://coronawarn.app/en/faq/#ramp_down
Apache License 2.0
6 stars 5 forks source link

Build instructions and compatibility with Node.js 18 LTS #43

Closed MikeMcC399 closed 1 year ago

MikeMcC399 commented 2 years ago

Where to find the issue

https://github.com/corona-warn-app/cwa-event-landingpage

Describe the issue

README - Requirements says:

"You need the LTS version of Node.js (which includes npm) to build the website."

followed by the instructions to execute the commands:

npm install
npm run build

18.12.0 LTS is the version displayed on the main page of https://nodejs.org/en/ which is the Active LTS version.

14.20.1 is classed as Maintenance according to https://nodejs.org/en/about/releases/.

Executing npm install using the active node LTS version 18 outputs the following message and causes the local version of package-lock.json to become out of sync with the git-managed file package-lock.json in the repository on the GitHub server:

npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile

Steps to reproduce

In cloned branch main of https://github.com/corona-warn-app/cwa-event-landingpage:

  1. nvm use lts/*
  2. npm install
  3. git status shows modified: package-lock.json

Suggested change

  1. Update the README description to recommend using the Node.js 14 Maintenance version instead of the Active LTS version 18.

and possibily:

  1. Update the repository https://github.com/corona-warn-app/cwa-event-landingpage to use Node.js 16 in alignment with other repositories:


Internal Tracking ID: EXPOSUREAPP-11893

MikeMcC399 commented 2 years ago

This issue has not yet been addressed. Since there is little activity on this repository it can be considered low priority.

If there is a clean-up done any time, then probably the .github/workflows/build.yml should be updated as well.

The build workflow uses a old Cypress Docker image although the repository contains no Cypress test specs and does not use Cypress at all.

    # Cypress Docker image with Chrome v80
    # and Firefox v73 pre-installed  cypress/browsers:node14.7.0-chrome84 cypress/browsers:node10.16.3-chrome80-ff73
    container: cypress/browsers:node14.7.0-chrome84
MikeMcC399 commented 1 year ago

Updated the OP due to the Node.js LTS version changing to 18 (previously 16).

npm run build in a Node.js 18 (LTS) environment fails:

$ npm run build

> corona-warn-app-landingpage@1.0.0 build
> gulp build --production

Error: Node Sass does not yet support your current environment: Linux 64-bit with Unsupported runtime (108)
For more information on which environments are supported please see:
https://github.com/sass/node-sass/releases/tag/v7.0.1

so the README should definitely not be recommending to use the LTS version.

Since there is otherwise no recent activity in this repository I don't plan to submit a PR to updated the README, unless this is requested.

There is a pinned open issue 3251 in https://github.com/sass/node-sass/issues regarding support of Node.js 18 by the deprecated node-sass package.

MikeMcC399 commented 1 year ago