Error in HotModuleReplacementPlugin after upgrading from 2 to 3.
See original GitHub issue** What is the current behavior?**
Upgrading from webpack 2 to 3, runningwebpack
in the commandline, gives me an error in HotModuleReplacementPlugin.Removing the plugin makes webpack pass.
C:\Users\Documents\project\node_modules\webpack\lib\HotModuleReplacementPlugin.js:59
records.chunkModuleIds[chunk.id] = chunk.mapModules(m => m.id);
^
TypeError: chunk.mapModules is not a function
at chunks.forEach.chunk (C:\Users\Documents\project
at Array.forEach (native)
at Compilation.<anonymous> (C:\Users\Documents\project
at Compilation.applyPlugins2 (C:\Users\Documents\project\node_modules\tapable\lib\Tapable.js:82:14)
at sealPart2 (C:\Users\Documents\projectn.js:629:10)
at Compilation.applyPluginsAsyncSeries (C:\Users\Documents\project
at Compilation.seal (C:\Users\Documents\projectn.js:579:8)
at C:\Users\Documents\projects:493:16
at C:\Users\Documents\project\node_modules\tapable\lib\Tapable.js:225:11
at _addModuleChain (C:\Users\Documents\projectn.js:481:11)
at processModuleDependencies.err (C:\Users\Documents\projectn.js:452:13)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
[nodemon] app crashed - waiting for file changes before starting...
** What is the expected behavior?**
I expected a smooth upgrade :)
webpack v3.5.2 node v7.4.0
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (2 by maintainers)
Top Results From Across the Web
Webpack Hot Module Replacement does not inject the ...
I eliminated the ExtractTextPlugin from my dev environment but now I get a [HMR] Update failed: Error: Manifest request to http://localhost/hot/ ...
Read more >A Deep Dive into Hot Module Replacement with Webpack ...
We will learn how to instruct the modules in our application to refresh themselves when they receive a hot update. The hot update...
Read more >Getting Started · React Hot Loader - Dan gaearon
Step 2 (of 3): Using HMR to replace the root component. To update components when changes occur, you need to add some code...
Read more >Hot Module Replacement - webpack
err : the error thrown by the callback in second argument or during dependency execution when using ESM dependencies. moduleId : the current...
Read more >Webpack's Hot Module Replacement Feature Explained
When a hot update failed to replace the code in the browser, the HMR runtime will let webpack-dev-server know. The webpack-dev-server will ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
destroy node_modules and npm install - solved my problem with HMR, webpack 3.5.3
This problem happens when you have old version webpack. Solution:
npm remove -g webpack
.npm cache clear --force
.webpack
and deps again.