flask-react-boilerplate
flask-react-boilerplate copied to clipboard
Fix dev server start error
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.