arqex/react-datetime

webpack error

wiryonolau opened this issue · 1 comments

I'm Submitting a ...

[ ] Bug report
[ ] Feature request
[x] Support request

Steps to Reproduce

  1. clone repo
  2. install dependencies npm install --include=dev
  3. run webpack npm run build

Expected Results

Actual Results

Failed

> react-datetime@3.1.0 build
> webpack --config config/webpack.config.build.js

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:19)
    at Object.createHash (node:crypto:133:10)
    at module.exports (/home/wiryono/Projects/NodeJS/react-datetime/node_modules/webpack/lib/util/createHash.js:135:53)
    at NormalModule._initBuildHash (/home/wiryono/Projects/NodeJS/react-datetime/node_modules/webpack/lib/NormalModule.js:417:16)
    at handleParseError (/home/wiryono/Projects/NodeJS/react-datetime/node_modules/webpack/lib/NormalModule.js:471:10)
    at /home/wiryono/Projects/NodeJS/react-datetime/node_modules/webpack/lib/NormalModule.js:503:5
    at /home/wiryono/Projects/NodeJS/react-datetime/node_modules/webpack/lib/NormalModule.js:358:12
    at /home/wiryono/Projects/NodeJS/react-datetime/node_modules/loader-runner/lib/LoaderRunner.js:373:3
    at iterateNormalLoaders (/home/wiryono/Projects/NodeJS/react-datetime/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
    at iterateNormalLoaders (/home/wiryono/Projects/NodeJS/react-datetime/node_modules/loader-runner/lib/LoaderRunner.js:221:10)
    at /home/wiryono/Projects/NodeJS/react-datetime/node_modules/loader-runner/lib/LoaderRunner.js:236:3
    at context.callback (/home/wiryono/Projects/NodeJS/react-datetime/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
    at /home/wiryono/Projects/NodeJS/react-datetime/node_modules/babel-loader/lib/index.js:55:71
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node.js v18.15.0

Minimal Reproduction of the Problem

Other Information (e.g. stacktraces, related issues, suggestions how to fix)

Using legacy works

NODE_OPTIONS=--openssl-legacy-provider npm run build