Skip to content

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

@pathmapper

Description

@pathmapper

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions