I upgraded my webpack v4 to v5 as per this docs and after that I am getting this error.
TypeError: Cannot add property htmlWebpackPluginAlterChunks, object is not extensible
at /home/ec2-user/abhisar/insights-master/frontend/node_modules/html-webpack-plugin/index.js:59:56
at Hook.eval [as call] (eval at create (/home/ec2-user/abhisar/insights-master/frontend/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:100:1)
at Hook.CALL_DELEGATE [as _call] (/home/ec2-user/abhisar/insights-master/frontend/node_modules/webpack/node_modules/tapable/lib/Hook.js:14:14)
at Compiler.newCompilation (/home/ec2-user/abhisar/insights-master/frontend/node_modules/webpack/lib/Compil
What can I do to resolve this?
I upgraded my webpack v4 to v5 as per this docs https://webpack.js/migrate/5
and after that I am getting this error.
TypeError: Cannot add property htmlWebpackPluginAlterChunks, object is not extensible
at /home/ec2-user/abhisar/insights-master/frontend/node_modules/html-webpack-plugin/index.js:59:56
at Hook.eval [as call] (eval at create (/home/ec2-user/abhisar/insights-master/frontend/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:100:1)
at Hook.CALL_DELEGATE [as _call] (/home/ec2-user/abhisar/insights-master/frontend/node_modules/webpack/node_modules/tapable/lib/Hook.js:14:14)
at Compiler.newCompilation (/home/ec2-user/abhisar/insights-master/frontend/node_modules/webpack/lib/Compil
What can I do to resolve this?
Share Improve this question edited Jul 19, 2021 at 18:55 halfer 20.4k19 gold badges108 silver badges201 bronze badges asked Jul 8, 2021 at 13:01 Abhisar TripathiAbhisar Tripathi 1,6591 gold badge12 silver badges21 bronze badges 1-
What is the version of
html-webpack-plugin
? – tmhao2005 Commented Jul 9, 2021 at 4:30
1 Answer
Reset to default 22I know this answer is a little late but I had the same issue recently. I was able to resolve it by updating my version of html-webpack-plugin to v5.3.2 (lastest as of this writing). I am using Node/NPM so for my solution I just changed the version number in my package.json file and then ran npm install