-
-
Notifications
You must be signed in to change notification settings - Fork 26.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doesn't work nicely with Node 18 (Or even 17) #12977
Comments
You can do it if you use rewiring tool such as craco. That's not ideal though. This should really be fixed in the core of CRA. |
|
@Dorious The reason you are seeing this issue in Node.js 17 or higher is because Node.js 17 released with OpenSSL 3.0 support which deprecates MD4 hashing algorithm and does not enable it by default. This was supported upto Node.js 16 which was released with OpenSSL 1.1.1 . This is used by all versions of webpack 4 and earlier versions of webpack 5 upto 5.61.0. You should double-check the version of webpack that is being pulled in by your react-scripts package. If you are using react-scripts 5.0.1 - you should not have any issues because that currently pulls in 5.61.0+ of webpack . That is the version of webpack that updated from OpenSSL based MD4 algorithm to a WebAssembly based MD4 implementation. |
Well I have 5.73.0 and the problem is there. So that's not true, or something else happens. |
same for me. |
I've been looking at a solution/workaround suggested on this thread #11756 With this one, you install the missing polyfills as "devDependencies": {
"buffer": "npm:buffer@^6.0.3",
"crypto": "npm:crypto-browserify@^3.12.0",
"http": "npm:stream-http@^3.2.0",
"https": "npm:https-browserify@^1.0.0",
"stream": "npm:stream-browserify@^3.0.0",
"util": "npm:util@^0.12.5",
"zlib": "npm:browserify-zlib@^0.2.0"
} It seems to work in my testing so far, at least it does so locally. And crucially, it does not involve changing the Webpack config, so doesn't require Craco or anything like it. |
brownieboy solution didn't work for me. Why does it even use file-loader for svgs 🤔 |
Describe the bug
Starting from Node 17 the Open SSL changed, and now we have to run in legacy mode, which probably isn't that great:
https://stackoverflow.com/a/73465262
Guys says we should change hashFunction in webpack output config, which obviously we can't do.
The text was updated successfully, but these errors were encountered: