gnidan / abi-to-sol

Generate Solidity interface from ABI JSON
https://gnidan.github.io/abi-to-sol
MIT License
324 stars 51 forks source link

Web UI currently fails to build/deploy #111

Closed gnidan closed 1 year ago

gnidan commented 1 year ago

Getting this in CI e.g.:

$ CI=false node --max-old-space-size=[40](https://github.com/gnidan/abi-to-sol/actions/runs/5088738880/jobs/9145512664#step:3:41)96 scripts/build.js
Creating an optimized production build...
Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:71:19)
    at Object.createHash (node:crypto:133:10)
    at module.exports (/home/runner/work/abi-to-sol/abi-to-sol/node_modules/webpack/lib/util/createHash.js:135:53)
    at NormalModule._initBuildHash (/home/runner/work/abi-to-sol/abi-to-sol/node_modules/webpack/lib/NormalModule.js:[41](https://github.com/gnidan/abi-to-sol/actions/runs/5088738880/jobs/9145512664#step:3:42)7:16)
    at handleParseError (/home/runner/work/abi-to-sol/abi-to-sol/node_modules/webpack/lib/NormalModule.js:[47](https://github.com/gnidan/abi-to-sol/actions/runs/5088738880/jobs/9145512664#step:3:48)1:10)
    at /home/runner/work/abi-to-sol/abi-to-sol/node_modules/webpack/lib/NormalModule.js:[50](https://github.com/gnidan/abi-to-sol/actions/runs/5088738880/jobs/9145512664#step:3:51)3:5
    at /home/runner/work/abi-to-sol/abi-to-sol/node_modules/webpack/lib/NormalModule.js:358:12
    at /home/runner/work/abi-to-sol/abi-to-sol/node_modules/loader-runner/lib/LoaderRunner.js:373:3
    at iterateNormalLoaders (/home/runner/work/abi-to-sol/abi-to-sol/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
    at iterateNormalLoaders (/home/runner/work/abi-to-sol/abi-to-sol/node_modules/loader-runner/lib/LoaderRunner.js:221:10)
    at /home/runner/work/abi-to-sol/abi-to-sol/node_modules/loader-runner/lib/LoaderRunner.js:236:3
    at runSyncOrAsync (/home/runner/work/abi-to-sol/abi-to-sol/node_modules/loader-runner/lib/LoaderRunner.js:130:11)
    at iterateNormalLoaders (/home/runner/work/abi-to-sol/abi-to-sol/node_modules/loader-runner/lib/LoaderRunner.js:232:2)
    at Array.<anonymous> (/home/runner/work/abi-to-sol/abi-to-sol/node_modules/loader-runner/lib/LoaderRunner.js:205:4)
    at Storage.finished (/home/runner/work/abi-to-sol/abi-to-sol/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:[55](https://github.com/gnidan/abi-to-sol/actions/runs/5088738880/jobs/9145512664#step:3:56):16)
    at /home/runner/work/abi-to-sol/abi-to-sol/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9

(Will look into this soon, sorry all! In the meantime, please use the NPM package locally.)

cds-amal commented 1 year ago

Hey @gnidan, Node moved to OpenSSL 3.0 and there's an option to enable the legacy behavior.

If you hit an ERR_OSSL_EVP_UNSUPPORTED error in your application with Node.js 17, it’s likely that your application or a module you’re using is attempting to use an algorithm or key size which is no longer allowed by default with OpenSSL 3.0. A command-line option, --openssl-legacy-provider, has been added to revert to the legacy provider as a temporary workaround for these tightened restrictions.

gnidan commented 1 year ago

Ah, thanks @cds-amal! I was going to start by upgrading the various devDeps, maybe that will fix the issue. Good to know there's this flag as a backup option.

(Probably should add the web-ui build to CI checks so this sorta thing can be caught sooner)

gnidan commented 1 year ago

Fixed for now (without further investigation) by setting an explicit Node.js version