Error in HotModuleReplacementPlugin after upgrading from 2 to 3.

** 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

Author: Fantashit

1 thought on “Error in HotModuleReplacementPlugin after upgrading from 2 to 3.

Comments are closed.