You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
"react-scripts build" gives webpack error: "Chunk.entrypoints: Use Chunks.addGroup instead" #4356
Create repo with older version of react-scripts ~1.0.17
Update react-scripts to 1.1.4
Run react-scripts-build
Expected Behavior
Build works.
Actual Behavior
The following error output occurs when running react-scripts build:
> react-scripts build
Creating an optimized production build...
/Users/myuser/devel/MyTeam/myapp-ui/node_modules/webpack/lib/Chunk.js:533
throw new Error("Chunk.entrypoints: Use Chunks.addGroup instead");
^
Error: Chunk.entrypoints: Use Chunks.addGroup instead
at Chunk.set (/Users/myuser/devel/MyTeam/myapp-ui/node_modules/webpack/lib/Chunk.js:533:9)
at /Users/myuser/devel/MyTeam/myapp-ui/node_modules/extract-text-webpack-plugin/dist/index.js:176:40
at Array.forEach (native)
at Compilation.<anonymous> (/Users/myuser/devel/MyTeam/myapp-ui/node_modules/extract-text-webpack-plugin/dist/index.js:171:18)
at Compilation.applyPluginsAsyncSeries (/Users/myuser/devel/MyTeam/myapp-ui/node_modules/react-scripts/node_modules/tapable/lib/Tapable.js:206:13)
at Compilation.seal (/Users/myuser/devel/MyTeam/myapp-ui/node_modules/react-scripts/node_modules/webpack/lib/Compilation.js:605:8)
at applyPluginsParallel.err (/Users/myuser/devel/MyTeam/myapp-ui/node_modules/react-scripts/node_modules/webpack/lib/Compiler.js:508:17)
at /Users/myuser/devel/MyTeam/myapp-ui/node_modules/react-scripts/node_modules/tapable/lib/Tapable.js:289:11
at _addModuleChain (/Users/myuser/devel/MyTeam/myapp-ui/node_modules/react-scripts/node_modules/webpack/lib/Compilation.js:507:11)
at processModuleDependencies.err (/Users/myuser/devel/MyTeam/myapp-ui/node_modules/react-scripts/node_modules/webpack/lib/Compilation.js:477:14)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
Looking at the dependency tree, react-scripts 1.1.3 depends on extract-text-webpack-plugin@3.0.2, see my output of npm ls extract-text-webpack-plugin
In extract-text-plugin on this line we see it accessing chunk.entrypoints (Chunk coming from import Chunk from 'webpack/lib/Chunk';). But if we look at webpack we can see that on this line it throws an error if you try to access chunk.entrypoints.
Running npm install -D extract-text-webpack-plugin@next solved the issue locally for me.
Reacted by Rafael Lagunas G, flasheye12, Sandeep Kunkunuru, Donovan, Isaac Durant, Dex Mills, Elvis Echezona Okafor, douglascpioc, Samir Sabri, Dmitry S. and 6 more
Reacted by Stefanos Lalic, GianGoulart-luizalabs, Ajay Kumar Vellanki, Rodrigo Xavier, Raul Villora Valencia and Batu
Reacted by Raul Villora Valencia, Zoltán Tóth and Pankaj Parkar
Activity
Timer commentedon Apr 24, 2018
This sounds like a npm bug, if you
rm -rf node_modulesand reinstall does it fix this problem?halfmatthalfcat commentedon May 5, 2018
Looks related to webpack-contrib/extract-text-webpack-plugin#701.
Running
npm install -D extract-text-webpack-plugin@nextsolved the issue locally for me.medaamarnadh commentedon Nov 19, 2018
What is the meaning of it ?