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

while add react-refresh-webpack-plugin the html-webpack-plugin would report an error #327

Closed
as17744 opened this issue Mar 11, 2021 · 3 comments · Fixed by #371
Closed

Comments

@as17744
Copy link

as17744 commented Mar 11, 2021

image

@as17744
Copy link
Author

as17744 commented Mar 11, 2021

webpack version: 5.24.3
react-refresh-webpack-plugin version: 0.4.3
html-webpack-plugin version: 5.2.0

@RwwL
Copy link

RwwL commented Mar 29, 2021

I've got nearly the same issue trying to run my development build after setting things up as I found them in the README.

webpack 5.28.0
react-refresh-webpack-plugin 0.4.3

One difference is that my stack trace doesn't include html-webpack-plugin at the end, it stops on the line before that.

$ webpack --config ./webpack.config.dev.js
(node:45948) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received undefined
    at Hash.update (internal/crypto/hash.js:84:11)
    at BulkUpdateDecorator.update (/Users/:user/:projectPath/node_modules/webpack/lib/util/createHash.js:51:14)
    at NormalModule.updateHash (/Users/:user/:projectPath/node_modules/webpack/lib/NormalModule.js:1222:8)
    at Compilation._createModuleHash (/Users/:user/:projectPath/node_modules/webpack/lib/Compilation.js:3097:10)
    at Compilation.createModuleHashes (/Users/:user/:projectPath/node_modules/webpack/lib/Compilation.js:3069:10)
    at /Users/:user/:projectPath/node_modules/webpack/lib/Compilation.js:2346:11
    at Hook.eval [as callAsync] (eval at create (/Users/:user/:projectPath/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/:user/:projectPath/node_modules/tapable/lib/Hook.js:18:14)
    at /Users/:user/:projectPath/node_modules/webpack/lib/Compilation.js:2306:36
    at eval (eval at create (/Users/:user/:projectPath/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:11:1)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:45948) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:45948) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

@RwwL
Copy link

RwwL commented Mar 29, 2021

My build started completing after I added new webpack.HotModuleReplacementPlugin(), in addition to new ReactRefreshWebpackPlugin(), in the config, per this advice in one of the currently pinned threads: #126 (comment)

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