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
nodejs 17: digital envelope routines::unsupported #14532
Comments
|
workaround: export NODE_OPTIONS=--openssl-legacy-provider |
The same situation is also with |
Yes, marked as critical |
We will not update that in webpack 4. |
For webpack 4 solutions:
|
hmm... We can't really automatically fallback to a different hashing algorithm, since this would break the determinism of builds (builds should be equal independent of node.js version). We are planning to migrate to a different hash function anyway for webpack 6. So currently you will have to use Seems like the need to release a new major becomes more pressing... |
To be honestly it is very strange from Node.js developers, no deprecation messages, they just remove it... and break a lot of packages |
node.js 17 uses OpenSSL3 which have changed code for initialization context of md family (including md4): But I agree that node.js could have warned you in advance, given that you are one of the biggest consumers. |
where should this be added? |
@FSM1 : if you use |
With Node 17 we are having the following message: `Error: error:0308010C:digital envelope routines::unsupported`. Downgrading to Node 16 seems better than forcing `export NODE_OPTIONS=--openssl-legacy-provider` and possibly running with [known insecure SSL](https://www.openssl.org/docs/manmaster/man7/OSSL_PROVIDER-legacy.html). Reference: webpack/webpack#14532 (comment)
Thanks but I'm a little confused please. Where do I put this piece of code? |
Where do I put this piece of code please? I'm a little confused |
@typedef24 run that before running |
npm install cross-env
{
"scripts": {
"build": "cross-env NODE_OPTIONS=--openssl-legacy-provider webpack ...."
}
} works for all os! 🎉 |
When using latest node, webpack produces an error, Error: error:0308010C:digital envelope routines::unsupported webpack/webpack#14532 This is due to the webpack version being 5.53.0 when running npm install. The error is fixed in 5.61.0 by the following merged pull request, webpack/webpack#14584 https://github.com/webpack/webpack/releases/tag/v5.61.0 When I set 5.61.0 as the minimum I now get 5.72.0 version which is latest. Build completes without error.
Worked on angular export NODE_OPTIONS=--openssl-legacy-provider |
Looks like it was a few different issues. The native build compilation error with Sharp was as a dependency of favicons-webpack-plugin, which looks to be something like PWA support. I can add that on my own as a standalone thing later on, so I disabled that for the time being. Once that was fixed, Webpack wouldn't run properly, and it turned out to be what seems like a deprecated Node feature of SSL which was removed, so you have to pass a specific flag to Node to enable it again. Going to try seeing how the built version of the site looks, and I want to try moving things over to Vite too, for modern bundling tech. webpack/webpack#14532 https://unix.stackexchange.com/questions/381902/permission-denied-when-we-use-npm-start-using-webpack https://stackoverflow.com/questions/1158091/defining-a-variable-with-or-without-export https://dev.to/wojtekmaj/migrating-your-react-app-from-webpack-to-vite-inp
* Update to latest webpack to fix issue in Node >=17 cc webpack/webpack#14532 * Configure CI with GitHub Actions * Rename files to fix case-sensitive filename issue
I did below and it worked: |
How to use at React native? |
Bug report
What is the current behavior?
Other relevant information:
webpack version: 5.59.0
Node.js version: 17.0.0
Operating System: linux x64
The text was updated successfully, but these errors were encountered: