fjelltopp / who-romania-ckan

A data library for the WHO Romania country office.
0 stars 0 forks source link

js assets fail to build on recent node #96

Open mixmixmix opened 5 days ago

mixmixmix commented 5 days ago
mix@raccoon ~/repos/fjelltopp/who-romania-ckan/ckanext-who-romania/ckanext/who_romania/react                                                      [17:56:24]
> $ yarnpkg build                                                                                                                         [±wrc40owasp ●(✹)]
yarn run v1.22.19
warning package.json: No license field
$ webpack --config webpack.config.js
node:internal/crypto/hash:69
  this[kHandle] = new _Hash(algorithm, xofLen);
                  ^

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:69:19)
    at Object.createHash (node:crypto:133:10)
    at BulkUpdateDecorator.hashFactory (/home/mix/repos/fjelltopp/who-romania-ckan/ckanext-who-romania/ckanext/who_romania/react/node_modules/webpack/lib/util/createHash.js:144:18)
    at BulkUpdateDecorator.update (/home/mix/repos/fjelltopp/who-romania-ckan/ckanext-who-romania/ckanext/who_romania/react/node_modules/webpack/lib/util/createHash.js:46:50)
    at RawSource.updateHash (/home/mix/repos/fjelltopp/who-romania-ckan/ckanext-who-romania/ckanext/who_romania/react/node_modules/webpack/node_modules/webpack-sources/lib/RawSource.js:64:8)
    at NormalModule._initBuildHash (/home/mix/repos/fjelltopp/who-romania-ckan/ckanext-who-romania/ckanext/who_romania/react/node_modules/webpack/lib/NormalModule.js:753:17)
    at handleParseResult (/home/mix/repos/fjelltopp/who-romania-ckan/ckanext-who-romania/ckanext/who_romania/react/node_modules/webpack/lib/NormalModule.js:817:10)
    at /home/mix/repos/fjelltopp/who-romania-ckan/ckanext-who-romania/ckanext/who_romania/react/node_modules/webpack/lib/NormalModule.js:908:4
    at processResult (/home/mix/repos/fjelltopp/who-romania-ckan/ckanext-who-romania/ckanext/who_romania/react/node_modules/webpack/lib/NormalModule.js:640:11)
    at /home/mix/repos/fjelltopp/who-romania-ckan/ckanext-who-romania/ckanext/who_romania/react/node_modules/webpack/lib/NormalModule.js:692:5
    at /home/mix/repos/fjelltopp/who-romania-ckan/ckanext-who-romania/ckanext/who_romania/react/node_modules/loader-runner/lib/LoaderRunner.js:406:3
    at iterateNormalLoaders (/home/mix/repos/fjelltopp/who-romania-ckan/ckanext-who-romania/ckanext/who_romania/react/node_modules/loader-runner/lib/LoaderRunner.js:232:10)
    at iterateNormalLoaders (/home/mix/repos/fjelltopp/who-romania-ckan/ckanext-who-romania/ckanext/who_romania/react/node_modules/loader-runner/lib/LoaderRunner.js:239:10)
    at /home/mix/repos/fjelltopp/who-romania-ckan/ckanext-who-romania/ckanext/who_romania/react/node_modules/loader-runner/lib/LoaderRunner.js:254:3
    at context.callback (/home/mix/repos/fjelltopp/who-romania-ckan/ckanext-who-romania/ckanext/who_romania/react/node_modules/loader-runner/lib/LoaderRunner.js:124:13)
    at /home/mix/repos/fjelltopp/who-romania-ckan/ckanext-who-romania/ckanext/who_romania/react/node_modules/babel-loader/lib/index.js:59:71 {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node.js v18.19.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Requires to run: export NODE_OPTIONS=--openssl-legacy-provider

mixmixmix commented 5 days ago

@ChasNelson1990 I thought you have also run into it. I'm not a Jeeyesser, but I think that means we should update our dependencies. But are they CKAN dependencies?

So my understanding now is that in the docker image we are on the legacy openssl so it works there.