cmu-delphi / www-main

Delphi's homepage.
https://delphi.cmu.edu/
MIT License
5 stars 6 forks source link

Upgrade to node v18 #959

Closed melange396 closed 2 months ago

melange396 commented 2 months ago

The update to COVIDcast v3.2.10 in https://github.com/cmu-delphi/www-main/pull/957 broke the build when i merged it in... I think this is because it introduced some dependencies that require node version 18+ (search https://github.com/cmu-delphi/www-main/blob/9bf7a77e17121279727046fb442e66891d6f25d8/package-lock.json for node": ">=18 to find them). Hopefully this appeases the build process....

netlify[bot] commented 2 months ago

Deploy Preview for cmu-delphi-main ready!

Name Link
Latest commit e0e56ab37b1798cb0af1bd86d5a6a125d6b2d19d
Latest deploy log https://app.netlify.com/sites/cmu-delphi-main/deploys/662815890993c200081eb9eb
Deploy Preview https://deploy-preview-959--cmu-delphi-main.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

melange396 commented 2 months ago

This was still broken after my initial commit -- it looks like the fatal error was actually:

npm ERR! `npm ci` can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` before continuing.
npm ERR! 
npm ERR! Invalid: lock file's katex@0.16.9 does not satisfy katex@0.16.10

and dependabot fixed this file sync problem as part of https://github.com/cmu-delphi/www-main/pull/960 , which i just merged into here and got a successful build. This PR should still fix the WARNINGS that i saw, which were numerous but looked like:

npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'cli-truncate@4.0.0',
npm WARN EBADENGINE   required: { node: '>=18' },
npm WARN EBADENGINE   current: { node: 'v1[6](https://github.com/cmu-delphi/www-main/actions/runs/8806124386/job/24170226118#step:5:7).20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'string-width@[7](https://github.com/cmu-delphi/www-main/actions/runs/8806124386/job/24170226118#step:5:8).1.0',
npm WARN EBADENGINE   required: { node: '>=18' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '[8](https://github.com/cmu-delphi/www-main/actions/runs/8806124386/job/24170226118#step:5:9).19.4' }
npm WARN EBADENGINE }
...
melange396 commented 2 months ago

this last commit updates node in the netlify environment, to match what github is now using in its actions: image and it also updates the npm version to match github actions, as well as the hugo version to match #944