‼️ Don’t disable optimization or minification ‼️
I had a similar issue which was pointing to an SCSS file at line 17, but that file doesn’t have that number of lines-


I spent 4-5 hours trying to fix the issue, but nothing worked. People suggest disabling miniification, but it is never recommended because that will reduce the performance of your code.
I missed the part that Angular do various optimisation in the production build, which is not enabled in the development mode. And because of that, the build errors can be misleading. I was reminded again by the answer https://stackoverflow.com/a/73663201/2405040.
Disabling the optimisation temporarily gave me the correct error, and then I was able to fix it.
