chromaui/chromatic-cli

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

prm-dan opened this issue · 5 comments

Bug report

It's been 1 month since our GitHub Action last ran. We're now getting this error.

https://github.com/promotedai/react-introspection/actions/runs/4267262178/jobs/7428667392

(node:1706) DeprecationWarning: Default PostCSS plugins are deprecated. When switching to '@storybook/addon-postcss',
you will need to add your own plugins, such as 'postcss-flexbugs-fixes' and 'autoprefixer'.
See https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#deprecated-default-postcss-plugins for details.
(Use `node --trace-deprecation ...` to show where the warning was created)
info => Using default Webpack4 setup
node:internal/crypto/hash:71
  this[kHandle] = new _Hash(algorithm, xofLen);
                  ^
Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:[71](https://github.com/promotedai/react-introspection/actions/runs/4267262178/jobs/7428667392#step:4:72):19)
    at Object.createHash (node:crypto:133:10)
    at module.exports (/home/runner/work/react-introspection/react-introspection/node_modules/webpack/lib/util/createHash.js:135:53)
    at NormalModule._initBuildHash (/home/runner/work/react-introspection/react-introspection/node_modules/webpack/lib/NormalModule.js:417:16)
    at handleParseError (/home/runner/work/react-introspection/react-introspection/node_modules/webpack/lib/NormalModule.js:471:10)
    at /home/runner/work/react-introspection/react-introspection/node_modules/webpack/lib/NormalModule.js:503:5
    at /home/runner/work/react-introspection/react-introspection/node_modules/webpack/lib/NormalModule.js:358:12
    at /home/runner/work/react-introspection/react-introspection/node_modules/loader-runner/lib/LoaderRunner.js:3[73](https://github.com/promotedai/react-introspection/actions/runs/4267262178/jobs/7428667392#step:4:74):3
    at iterateNormalLoaders (/home/runner/work/react-introspection/react-introspection/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
    at /home/runner/work/react-introspection/react-introspection/node_modules/loader-runner/lib/LoaderRunner.js:205:4
    at /home/runner/work/react-introspection/react-introspection/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:85:15
    at process.processTicksAndRejections (node:internal/process/task_queues:[77](https://github.com/promotedai/react-introspection/actions/runs/4267262178/jobs/7428667392#step:4:78):11) {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}
Node.js v18.14.1
Error: non-zero exit code

It looks like your PR upgrades the chromatic CLI version in package.json, but doesn't update the package-lock.json. Does it fix the issue if you update the lock file with npm install?

Thanks. I updated package-lock.json. Looks like the error still happens though.

Can you try adding this to the beginning of your workflow steps?

      - name: Specify Node Version
        uses: actions/setup-node@v3
        with:
          node-version: 16

I think a recent change in github-runner may have broken the action. Specifying node v16 should get you going.

@andrewortwein thanks, it helped!