Doist / reactist

Open source React components made with ❤️ by Doist
http://doist.github.io/reactist
MIT License
250 stars 22 forks source link

chore: Explicitely enforce Chromatic build node version #758

Closed engfragui closed 1 year ago

engfragui commented 1 year ago

Short description

When working on https://github.com/Doist/reactist/pull/757, I noticed en error in the "Publish to Chromatic" build:

Error: error:0308010C:digital envelope routines::unsupported

Based on "the internet", it seems like this is due to fact that that build is running on Node v18, even though we're not (yet) intentionally supporting it in Reactist.

It actually started failing even before this PR, when I merged my previous PR. See this build: https://github.com/Doist/reactist/actions/runs/4224761740/jobs/7336138735

The best solution here seems to be to ensure that, before running the Chromatic publish step, we actually select the intended Node version, instead of relying on the default Node version that's brought in by ubuntu-latest, which apparently recently switched from Node 16 to Node 18.

I actually "took" this fix from todoist-web (cypress build): https://github.com/Doist/todoist-web/blob/main/.github/workflows/check-cypress-automation.yml#L92-L97

PR Checklist

Versioning