BIDMCDigitalPsychiatry / LAMP-platform

The LAMP Platform (issues and documentation).
https://docs.lamp.digital/
Other
13 stars 10 forks source link

LAMP Docs Update Failures due to Outdated Node.js Version #826

Open MattMatt27 opened 3 weeks ago

MattMatt27 commented 3 weeks ago

Describe the bug I just tried making a very minor change to LAMP-platform (fix the favicon path) but the gh-release build failed and I am wondering if this is a more serious concern that requires addressing. It looks like a few of the packages are now expecting a Node.js version of 18 and we are still using 16. See build error below.

Run npm install
npm WARN ERESOLVE overriding peer dependency
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'cheerio@1.0.0',
npm WARN EBADENGINE   required: { node: '>=18.17' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'undici@6.19.8',
npm WARN EBADENGINE   required: { node: '>=18.17' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'whatwg-mimetype@4.0.0',
npm WARN EBADENGINE   required: { node: '>=18' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'whatwg-encoding@3.1.1',
npm WARN EBADENGINE   required: { node: '>=18' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
...
Error:  Unable to build website for locale en.
Error:  ReferenceError: ReadableStream is not defined
    at Object.<anonymous> (/home/runner/work/LAMP-platform/LAMP-platform/node_modules/undici/lib/web/fetch/response.js:527:3)
    at Module._compile (node:internal/modules/cjs/loader:1198:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10)
    at Module.load (node:internal/modules/cjs/loader:1076:32)
    at Function.Module._load (node:internal/modules/cjs/loader:911:12)
    at Module.require (node:internal/modules/cjs/loader:1100:19)
    at require (node:internal/modules/cjs/helpers:119:18)
    at Object.<anonymous> (/home/runner/work/LAMP-platform/LAMP-platform/node_modules/undici/lib/web/fetch/index.js:11:5)
    at Module._compile (node:internal/modules/cjs/loader:1198:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10)
Error: Process completed with exit code 1.

To Reproduce Steps to reproduce the behavior:

  1. Make a change in LAMP-platform package.json
  2. Commit changes
  3. gh-release should fail

Expected behavior gh-release should succeed and changes should be reflected in the documentation

Desktop (please complete the following information):

Additional context Based on my understanding it seems like the two potential solutions are upgrading our Node.js version to 18. Or adding package specific version dependencies for all failing packages so that they continue to work on Node 16.

ZCOEngineer commented 3 weeks ago

We shall review this @MattMatt27

sarithapillai8 commented 2 weeks ago

@MattMatt27 This needs to be done across all repositories, including LAMP-server, LAMP-js, LAMP-worker, LAMP-dashboard, and LAMP-activities (for all activities). It will be a time-consuming process, and we need to thoroughly test each functionality after making the changes. We shall look into this.