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

Log4brains is broken on Node v18.x #85

Open
thomvaill opened this issue Sep 22, 2022 · 1 comment · May be fixed by #114
Open

Log4brains is broken on Node v18.x #85

thomvaill opened this issue Sep 22, 2022 · 1 comment · May be fixed by #114
Labels
bug Something isn't working

Comments

@thomvaill
Copy link
Owner

Bug Report

Steps to Reproduce

nvm use 18
log4brains build

# output:
Building Log4brains...
[Next]  Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:71:19)
    at Proxy.createHash (node:crypto:133:10)
    at module.exports.__webpack_modules__.15660.module.exports (/opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:111680:62)
    at NormalModule._initBuildHash (/opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:85092:16)
    at handleParseError (/opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:85146:10)
    at /opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:85178:5
    at /opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:85033:12
    at /opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:51096:3
    at iterateNormalLoaders (/opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:50937:10)
    at iterateNormalLoaders (/opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:509[44](https://github.com/thomvaill/log4brains/actions/runs/3107331593/jobs/5035316854#step:4:45):10)
    at /opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:50959:3
    at runSyncOrAsync (/opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:50853:11)
    at iterateNormalLoaders (/opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:50955:2)
    at processResource (/opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:50931:3)
    at iteratePitchingLoaders (/opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:50881:10)
    at iteratePitchingLoaders (/opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:50888:10)
[Next]  Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:71:19)
    at Proxy.createHash (node:crypto:133:10)
    at module.exports.__webpack_modules__.15660.module.exports (/opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:111680:62)
    at NormalModule._initBuildHash (/opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:85092:16)
    at handleParseError (/opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:851[46](https://github.com/thomvaill/log4brains/actions/runs/3107331593/jobs/5035316854#step:4:47):10)
    at /opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:85178:5
    at /opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:85033:12
    at /opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:51096:3
    at iterateNormalLoaders (/opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:50937:10)
    at iterateNormalLoaders (/opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:50944:10)
    at /opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:50959:3
    at runSyncOrAsync (/opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:50853:11)
    at iterateNormalLoaders (/opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:50955:2)
    at processResource (/opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:50931:3)
    at iteratePitchingLoaders (/opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:50881:10)
    at iteratePitchingLoaders (/opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:50888:10)
[Next]  Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:71:19)
    at Proxy.createHash (node:crypto:133:10)
    at module.exports.__webpack_modules__.15660.module.exports (/opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:111680:62)
    at NormalModule._initBuildHash (/opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:85092:16)
    at handleParseError (/opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:85146:10)
    at /opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:85178:5
    at /opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:85033:12
    at /opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:51096:3
    at iterateNormalLoaders (/opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:50937:10)
    at iterateNormalLoaders (/opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:50944:10)
    at /opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:50959:3
    at runSyncOrAsync (/opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:50853:11)
    at iterateNormalLoaders (/opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:50955:2)
    at processResource (/opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:50931:3)
    at iteratePitchingLoaders (/opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:50881:10)
    at iteratePitchingLoaders (/opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:50888:10)
[Next]  Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:71:19)
    at Proxy.createHash (node:crypto:133:10)
    at module.exports.__webpack_modules__.15660.module.exports (/opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:111680:62)
    at NormalModule._initBuildHash (/opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:85092:16)
    at handleParseError (/opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:85146:10)
    at /opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:85178:5
    at /opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:85033:12
    at /opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:51096:3
    at iterateNormalLoaders (/opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:50937:10)
    at iterateNormalLoaders (/opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:50944:10)
    at /opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:50959:3
    at runSyncOrAsync (/opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:50853:11)
    at iterateNormalLoaders (/opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:50955:2)
    at processResource (/opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:50931:3)
    at iteratePitchingLoaders (/opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:50881:10)
    at iteratePitchingLoaders (/opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:50888:10)
node:internal/crypto/hash:71
  this[kHandle] = new _Hash(algorithm, xofLen);
                  ^

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:71:19)
    at Proxy.createHash (node:crypto:133:10)
    at module.exports.__webpack_modules__.15660.module.exports (/opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:111680:62)
    at NormalModule._initBuildHash (/opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:85092:16)
    at /opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:85127:10
    at /opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:8[49](https://github.com/thomvaill/log4brains/actions/runs/3107331593/jobs/5035316854#step:4:50)98:13
    at /opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:51090:11
    at /opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:[50](https://github.com/thomvaill/log4brains/actions/runs/3107331593/jobs/5035316854#step:4:51)9[56](https://github.com/thomvaill/log4brains/actions/runs/3107331593/jobs/5035316854#step:4:57):18
    at context.callback (/opt/hostedtoolcache/node/18.9.0/x[64](https://github.com/thomvaill/log4brains/actions/runs/3107331593/jobs/5035316854#step:4:65)/lib/node_modules/log4brains/node_modules/next/dist/compiled/webpack/bundle4.js:50[83](https://github.com/thomvaill/log4brains/actions/runs/3107331593/jobs/5035316854#step:4:84)4:13)
    at /opt/hostedtoolcache/node/18.9.0/x64/lib/node_modules/log4brains/node_modules/next/dist/build/webpack/loaders/babel-loader/src/index.js:4:106 {
  opensslErrorStack: [ 'error:030000[86](https://github.com/thomvaill/log4brains/actions/runs/3107331593/jobs/5035316854#step:4:87):digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Expected Behavior

Should work :-)

Environment

  • Log4brains version: 1.0.1
  • Node.js version: 18.9.0
  • OS and its version: all
  • Browser information: n/a

Possible Solution

Probably some dependency updates.

@thomvaill thomvaill added the bug Something isn't working label Sep 22, 2022
@creinig
Copy link

creinig commented Oct 27, 2022

Reason is a bug in webpack that's fixed in webpack 5.61.0. log4brains uses webpack-bundle-analyzer 4.3.0 which in turn depends on webpack. The current webpack-bundle-analyzer (4.7.0) however still depends on webpack-5.37.1, so simply moving to the latest version here won't fix the problem (yet).

See this stackoverflow answer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants