flask-react-boilerplate icon indicating copy to clipboard operation
flask-react-boilerplate copied to clipboard

Fix dev server start error

Open adnull opened this issue 1 year ago • 0 comments

The original code has outdated webpack which is using outdated openssl functions, so it produces the next error on development server start:

node:internal/crypto/hash:68
  this[kHandle] = new _Hash(algorithm, xofLen);
                  ^

...

Error: error:0308010C:digital envelope routines::unsupported
  at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read/context:68:3) {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

This happens because:

From Node version 17 onwards node upgraded from OpenSSL1.1.1 to OpenSSL3. And OpenSSL3 doesn't support some old Hashing techniques. Which is why we face this error 'ERR_OSSL_EVP_UNSUPPORTED'.

Updating to the last available version of webpack fixes this.

adnull avatar Oct 16 '23 22:10 adnull