If you are reporting a bug or having an issue setting up React Hot Loader, please fill in below. For feature requests, feel free to remove this template entirely.
run yarn dev
receive an ERROR "TypeError: leaveModule is not a function"
if use v4.6.3
all normal
no issue
/Users/hanlike/Documents/neuronFE/node_modules/webpack-cli/bin/cli.js:235
throw err;
^
TypeError: leaveModule is not a function
at /Users/hanlike/Documents/neuronFE/configs/webpack.config.base.js:141:3
at Object.<anonymous> (/Users/hanlike/Documents/neuronFE/configs/webpack.config.base.js:142:3)
at Module._compile (/Users/hanlike/Documents/neuronFE/node_modules/v8-compile-cache/v8-compile-cache.js:178:30)
at Module._compile (/Users/hanlike/Documents/neuronFE/node_modules/pirates/lib/index.js:83:24)
at Module._extensions..js (internal/modules/cjs/loader.js:699:10)
webpack 4.29
Typescript 3.2
babel 7
repo https://github.com/electron-react-boilerplate/examples/tree/master/examples/typescript
React Hot Loader version: v4.6.4
Run these commands in the project folder and fill in their results:
node -v:v10.13.0npm -v:yarn 1.12.3Then, specify:
Please take the time to create a new project that reproduces the issue.
You can copy your project that experiences the problem and start removing things until you鈥檙e left with the minimal reproducible demo. This helps contributors, and you might get to the root of your problem during that process.
Push to GitHub and paste the link here.
I met the same problem
https://github.com/gaearon/react-hot-loader/compare/v4.6.3...v4.6.4#diff-66ea0cdc3989360adbd4955babda95e0R46
Should we make an empty check?

Same problem!
+1
Same
+1
馃敟
Honestly - I have no idea why this code got executed on webpack side. But:
4.6.5 - still same error
How simple version bump should have fixed this?
+1
@blinkzz - 4.6.5 should contain a patch - https://github.com/gaearon/react-hot-loader/commit/6f8573fb44f7089d24e7c6f4af0246bf87477fff
You might have you code cached. Or delete the cache (node_modules/.cache or /tmp), or change anything in your .babelrc, and re-run.
Yeap, that was an issue with npm cache, even after node_modules clean install.
Thanks for clue and quickfix
v4.6.5 fixed
Most helpful comment
Yeap, that was an issue with npm cache, even after node_modules clean install.
Thanks for clue and quickfix