mpontus / create-react-app-hot-loader

Webpack dev-server for create-react-app projects with support for hot reloading.
6 stars 2 forks source link

TypeError: chunk.mapModules is not a function #3

Open lamuertepeluda opened 6 years ago

lamuertepeluda commented 6 years ago

Hi there,

I tried your module but no luck.

Environment

This is the error I get when running npm start

/Users/vitomacchia/Development/JavaScript/React/my-example/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 (/Users/vitomacchia/Development/JavaScript/React/my-example/node_modules/webpack/lib/HotModuleReplacementPlugin.js:59:47)
    at Array.forEach (<anonymous>)
    at Compilation.<anonymous> (/Users/vitomacchia/Development/JavaScript/React/my-example/node_modules/webpack/lib/HotModuleReplacementPlugin.js:58:17)
    at Compilation.applyPlugins2 (/Users/vitomacchia/Development/JavaScript/React/my-example/node_modules/tapable/lib/Tapable.js:82:14)
    at sealPart2 (/Users/vitomacchia/Development/JavaScript/React/my-example/node_modules/create-react-app-hot-loader/node_modules/webpack/lib/Compilation.js:629:10)
    at Compilation.applyPluginsAsyncSeries (/Users/vitomacchia/Development/JavaScript/React/my-example/node_modules/tapable/lib/Tapable.js:195:46)
    at Compilation.seal (/Users/vitomacchia/Development/JavaScript/React/my-example/node_modules/create-react-app-hot-loader/node_modules/webpack/lib/Compilation.js:579:8)
    at /Users/vitomacchia/Development/JavaScript/React/my-example/node_modules/create-react-app-hot-loader/node_modules/webpack/lib/Compiler.js:493:16
    at /Users/vitomacchia/Development/JavaScript/React/my-example/node_modules/tapable/lib/Tapable.js:289:11
    at _addModuleChain (/Users/vitomacchia/Development/JavaScript/React/my-example/node_modules/create-react-app-hot-loader/node_modules/webpack/lib/Compilation.js:481:11)
    at processModuleDependencies.err (/Users/vitomacchia/Development/JavaScript/React/my-example/node_modules/create-react-app-hot-loader/node_modules/webpack/lib/Compilation.js:452:13)
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at process._tickCallback (internal/process/next_tick.js:180:9)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! my-example@1.0.0 start: `create-react-app-hot-loader`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the my-example@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
mpontus commented 6 years ago

Thanks for the report. I'll take a look at it later today.

mpontus commented 6 years ago

I can confirm the problem. The module appears to be incompatible with Webpack 3. Downgrading to webpack 2 however leads to other problems.

For now I'm deprecating the package and adding a defunct notice.

lamuertepeluda commented 6 years ago

wow I couldn't figure out it was so bad! 😮