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

Problem with hot reload example on Node v18 LTS #344

Closed
mdavidmorton opened this issue Mar 17, 2023 · 0 comments · Fixed by #355
Closed

Problem with hot reload example on Node v18 LTS #344

mdavidmorton opened this issue Mar 17, 2023 · 0 comments · Fixed by #355

Comments

@mdavidmorton
Copy link

This probably touches several parts of this project. I wanted to make sure it was documented for anyone trying to get this example to work.

I'm currently running Node 18 LTS on macOS. I believe it also affects v17 and higher.

hot-reload git:(master) ✗ ./node_modules/.bin/webpack --config webpack.config.js --watch

webpack is watching the files…

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 Object.createHash (node:crypto:133:10)
    at module.exports (/.../django-webpack-loader/examples/hot-reload/node_modules/webpack/lib/util/createHash.js:135:53)
    at NormalModule._initBuildHash (/.../django-webpack-loader/examples/hot-reload/node_modules/webpack/lib/NormalModule.js:417:16)
    at handleParseError (/.../django-webpack-loader/examples/hot-reload/node_modules/webpack/lib/NormalModule.js:471:10)
    at /.../django-webpack-loader/examples/hot-reload/node_modules/webpack/lib/NormalModule.js:503:5
    at /.../django-webpack-loader/examples/hot-reload/node_modules/webpack/lib/NormalModule.js:358:12
    at /.../django-webpack-loader/examples/hot-reload/node_modules/loader-runner/lib/LoaderRunner.js:373:3
    at iterateNormalLoaders (/.../django-webpack-loader/examples/hot-reload/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
    at iterateNormalLoaders (/.../django-webpack-loader/examples/hot-reload/node_modules/loader-runner/lib/LoaderRunner.js:221:10)
    at /.../django-webpack-loader/examples/hot-reload/node_modules/loader-runner/lib/LoaderRunner.js:236:3
    at context.callback (/.../django-webpack-loader/examples/hot-reload/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
    at /.../django-webpack-loader/examples/hot-reload/node_modules/babel-loader/lib/index.js:44:71 {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node.js v18.14.2

Here is a workaround.

I was able to get hot-reloading to work with this project and Webpack 5, but there might be other issues I'm not aware of with that version.

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.

1 participant