Cannot read property 'compilation' of undefined
See original GitHub issueI don’t know what’s going on here. Just reporting a bug.
⠋ building for production.../Users/vasyl/code/node_modules/critters-webpack-plugin/dist/critters.js:181
compiler.hooks.compilation.tap(PLUGIN_NAME, function (compilation) {
^
TypeError: Cannot read property 'compilation' of undefined
at Critters.apply (/Users/vasyl/code/node_modules/critters-webpack-plugin/dist/critters.js:181:20)
at Compiler.apply (/Users/vasyl/code/node_modules/tapable/lib/Tapable.js:375:16)
at webpack (/Users/vasyl/code/node_modules/webpack/lib/webpack.js:33:19)
at err (/Users/vasyl/code/build/build.js:19:5)
...
Webpack 3. VueJS project. Happens regardless of where in the plugin array I add critters.
I am far from being the best frontend developer. Not familiar with how webpack works either.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:8
- Comments:8
Top Results From Across the Web
TypeError: Cannot read property 'compilation' of undefined #360
Operating System: MacOS Node Version: 10.10.0 NPM Version: 6.4.1 webpack Version: 3.12.0 ${package} Version: 2.0.1 Actual Behavior /.
Read more >Cannot read property 'compilation' of undefined - Stack Overflow
So you'll need to install the plugin specifying the version when installation with npm : npm install --save-dev uglifyjs-webpack-plugin@1.
Read more >Issue with purgeCSS with tailwind and Sage 9.0.10
error An unexpected error occurred: “could not find a copy of webpack to link ... TypeError: Cannot read property 'compilation' of undefined.
Read more >Webpack error - Cannot read property 'thisCompilation' of ...
Webpack error - Cannot read property 'thisCompilation' of undefined. I am using copy-webpack-plugin to copy my entire images folder from src to dist...
Read more >webpack打包时报错:TypeError: Cannot read ... - CSDN博客
webpack打包时报错:TypeError: Cannot read property 'compilation' of undefined · “相关推荐”对你有帮助么? · 分类专栏 · 最新评论 · 您愿意向朋友推荐“ ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Ah - I think right now we require Webpack 4+, but it would be a simple change to support 3 and prior.
Finally I applied Critters to my project. And I must say that’s a huge relief!
critical
has 24 security issue (as pernpm audit
) and none was going to fix themconfig.plugins.push(new (require("critters-webpack-plugin"))());
.