Compilation Error
See original GitHub issueHi @Siilwyn,
after upgrading to the latest version I realized that there is a compilation error.
Failed to compile.
static/css/main.b90420c1.css from Css Minimizer plugin
TypeError: Cannot read property 'insertAfter' of undefined
at Array.forEach (<anonymous>)
It occurs in the following code block:
comments.forEach(node => {
const pairedNode = node.pairedNode;
node.comment.remove();
pairedNode.parent['insert' + node.insertPosition](pairedNode, node.comment);
});
It happens in case the pairedNode has no parent.
Then pairedNode.parent['insert' + node.insertPosition](pairedNode, node.comment);
fails.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:5 (2 by maintainers)
Top Results From Across the Web
What Is a Compilation Error? (with picture) - EasyTechJunkie
A compilation error is an error in building a machine code file for a computer language. Many computer languages compile their source code ......
Read more >Difference between Compile Time Errors and Runtime Errors
Compile-Time Errors: Errors that occur when you violate the rules of writing syntax are known as Compile-Time errors. This compiler error ...
Read more >7.3. Compile Errors and Warnings
A compile error happens when the compiler reports something wrong with your program, and does not produce a machine-language translation.
Read more >Reading/Fixing Compilation Errors
An attempted compile cycle with many errors can be overwhelming, but approaching the problem in a systematic way will help wade through the...
Read more >What is a compilation error? - Quora
A compilation error is a message from your compiler that something is wrong, and it can't read your code. · In more details,...
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
You made my day! Thanks a lot for the quick fix!
For posterity this is odd behaviour of the
sass-loader
whichcss-minimizer-webpack-plugin
is using in the CRA and other examples posted above. SCSS parsing is pretty weird especially when nesting nodes with special comments that it keeps even in compressed mode.Fixed in version
6.1.4