I created the default IntelliJ IDEA React project and got this:
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:67:19)
at Object.createHash (node:crypto:130:10)
at module.exports (/Users/user/Programming Documents/WebServer/untitled/node_modules/webpack/lib/util/createHash.js:135:53)
at NormalModule._initBuildHash (/Users/user/Programming Documents/WebServer/untitled/node_modules/webpack/lib/NormalModule.js:417:16)
at handleParseError (/Users/user/Programming Documents/WebServer/untitled/node_modules/webpack/lib/NormalModule.js:471:10)
at /Users/user/Programming Documents/WebServer/untitled/node_modules/webpack/lib/NormalModule.js:503:5
at /Users/user/Programming Documents/WebServer/untitled/node_modules/webpack/lib/NormalModule.js:358:12
at /Users/user/Programming Documents/WebServer/untitled/node_modules/loader-runner/lib/LoaderRunner.js:373:3
at iterateNormalLoaders (/Users/user/Programming Documents/WebServer/untitled/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
at iterateNormalLoaders (/Users/user/Programming Documents/WebServer/untitled/node_modules/loader-runner/lib/LoaderRunner.js:221:10)
/Users/user/Programming Documents/WebServer/untitled/node_modules/react-scripts/scripts/start.js:19
throw err;
^
It seems to be a recent issue – webpack ran into this 4 days ago and is still working on it.
The blunder comes from your dependency relying on an obsolete version of SSL, so you have two good, and two questionable-at-best: 1. Just reinstall your dependence.
Delete your node_modules folder and rerun npm install. If your dependency is based on compiling against whatever version of Node you have installed, this will fix the problem immediately. This is the least likely solution to work, but may fix it without any “real” work on your part so is always worth trying.
2. Update your dependency on .
Nearly all dependencies with this problem have a newer version that you can install instead. When Node 18 became the LTS version of node, band uplift your dependency to that version.
In fact, like Node.js itself, this is the only correct answer: update your dependencies, as they can make your project vulnerable to attacks and exploits. 3. Downgrade to Nodes v16.
Node itself can be downgraded so that you’re using a version of LibSSL’s old, insecure, version that doesn’t “solve” the problem of running insecurity and potentially exploitable code, of course, but your code will at least run.
This is, of course, a bad idea: (You can do that with the official Node installers, or you can use something like .v.. for Windows-windows.) It’s the next one: 4. Tell Nodes to use the legacy OpenSSL provider On Unix-like (Linux, macOS, Git bash, etc.), export NODE_OPTIONS=–openssl-legacy-provider.
Set NODE_OPTIONS=–openssl-legacy-provider on Windows command prompt: .
PowerShell: $env:NODE_OPTIONS = “–openssl-legacy-provider”
Node 18 had just become the active LTS options 1 and 2 weren’t really available, but for anyone who still has this answer, 3 and 4 should no longer be serious options in any way.