Posted at

Webpack4でのビルドエラー「Chunk.entrypoints:」

More than 1 year has passed since last update.


問題と対処法

webpack4 環境で build 時に以下エラーが出た場合。

Error: Chunk.entrypoints: Use Chunks.groupsIterable and filter by instanceof Entrypoint instead

at Chunk.get (/var/www/node_modules/webpack/lib/Chunk.js:750:9)
at /var/www/node_modules/extract-text-webpack-plugin/dist/index.js:176:48
at Array.forEach (<anonymous>)
at /var/www/node_modules/extract-text-webpack-plugin/dist/index.js:171:18
at AsyncSeriesHook.eval [as callAsync] (eval at create (/var/www/node_modules/tapable/lib/HookCodeFactory.js:24:12), <anonymous>:7:1)
at AsyncSeriesHook.lazyCompileHook [as _callAsync] (/var/www/node_modules/tapable/lib/Hook.js:35:21)
at Compilation.seal (/var/www/node_modules/webpack/lib/Compilation.js:905:27)
at hooks.make.callAsync.err (/var/www/node_modules/webpack/lib/Compiler.js:494:17)
at _err0 (eval at create (/var/www/node_modules/tapable/lib/HookCodeFactory.js:24:12), <anonymous>:11:1)
at _addModuleChain (/var/www/node_modules/webpack/lib/Compilation.js:771:12)
at processModuleDependencies.err (/var/www/node_modules/webpack/lib/Compilation.js:710:9)
at process._tickCallback (internal/process/next_tick.js:61:11)

extract-text-webpack-plugin のver.問題らしい。

npm i -D extract-text-webpack-plugin@next

すると通るようになった。


参考