2

I am getting ERROR in Expected a pseudo-class or pseudo-element. error after running ng build with "optimization": true parameter. (If I disabled the optimization flag the build will pass but resulted with like 20mb large vendor.js file!)

I had searched online that the error indicated some css format issue. However, even I pass the --verbose flag, angular won't give me the proper information about which css file angular failed to parse. What can I do to make angular give me more relevant information? For this project, there are over a thousand searched results for :, it's not so practical to debug manually. Also this is an angular 9 project.

Jiahua Zhang
  • 511
  • 7
  • 19
  • try searching for colon and a space `: `, it seems like the most possible mistake – Andrei Jun 18 '21 at 21:58
  • There are still over 1300 results searching `: `, and I believe `:` without space are the root cause? – Jiahua Zhang Jun 19 '21 at 01:16
  • Maybe search in your node module folder for the file throwing the `Expected a pseudo-class` error, then temporarily modify that file to add debug info – David Jun 19 '21 at 09:08
  • There are 0 result for this search. Searching `pseudo-class` or `pseudo-element` alone is not helpful as wel. – Jiahua Zhang Jun 20 '21 at 03:17

0 Answers0