Skip to content
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

Webpack build fails with node 16 and openssl 3 provided by os #923

Closed
pathmapper opened this issue Jan 1, 2022 · 2 comments
Closed

Webpack build fails with node 16 and openssl 3 provided by os #923

pathmapper opened this issue Jan 1, 2022 · 2 comments

Comments

@pathmapper
Copy link
Contributor

pathmapper commented Jan 1, 2022

I'm submitting a bug report

ref #917, #918

Webpack Version:
5.65.0

Babel Core Version:
7.0.0-bridge.0

Babel Loader Version:
8.2.3

Please tell us about your environment:
Fedora Rawhide (comes with OpenSSL 3) with node 16 (LTS)

Current behavior:
https://github.com/pathmapper/test-landingpage/runs/4675042075?check_suite_focus=true

Build fails with:

ERROR  Failed to compile with 1 error7:33:27 PM
  
  error  in ./src/main.js
  
  Syntax Error: Thread Loader (Worker 0)
  error:0308010C:digital envelope routines::unsupported
      at Generator.next (<anonymous>)
      at new Promise (<anonymous>)

because md4 hashing is used which is deprecated by OpenSSL3.

// md4 hashing is not supported starting with node v17.0.0
const majorNodeVersion = parseInt(process.versions.node.split(".")[0], 10);
let hashType = "md4";
if (majorNodeVersion >= 17) {
hashType = "md5";

Expected/desired behavior:
Build runs without errors.

  • If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem along with a gist/jsbin of your webpack configuration.
  • What is the motivation / use case for changing the behavior?
    Use babel-loader with node 16 LTS on operating system with OpenSSL 3.
@nicolo-ribaudo
Copy link
Member

We can check process.versions.openssl other than process.versions.node in the code you linked; would you like to open a PR?

@pathmapper
Copy link
Contributor Author

#924 is merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants