From 0164d945c6f39bd7050c3d218637c9002227d154 Mon Sep 17 00:00:00 2001 From: Davide Silva Date: Mon, 18 Jul 2022 15:24:37 +0100 Subject: [PATCH] Pass node options to `yarn build` Why: * Node version 18 no longer supports MD4 as a hashing algorithm * Trying to build the project results in a `ERR_OSSL_EVP_UNSUPPORTED` error * https://nodejs.org/api/cli.html#--openssl-legacy-provider * https://stackoverflow.com/questions/69394632/webpack-build-failing-with-err-ossl-evp-unsupported How: * Adding `NODE_OPTIONS=--openssl-legacy-provider` to the `yarn build` command in `bin/build` script --- bin/build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/build b/bin/build index 224be6b8..f6f867d9 100755 --- a/bin/build +++ b/bin/build @@ -7,7 +7,7 @@ test -f .envrc && . "./.envrc" pp_info "build" "Building the frontend assets..." rm -rf frontend/build priv/static -yarn build +NODE_OPTIONS=--openssl-legacy-provider yarn build mkdir -p priv/static cp -R frontend/build/* priv/static rm -rf frontend/build