- [x] feature request
Running ng build doesn't produce failures, as ng build --prod produces the following failure:
...
chunk {16} runtime.667016fda4470b3fa9d5.js (runtime) 2.23 kB [entry] [rendered]
chunk {17} styles.d744bf875eaf9597f61a.css (styles) 208 kB [initial] [rendered]
chunk {18} polyfills.26f656e0dd3658ccb4ae.js (polyfills) 64.3 kB [initial] [rendered]
chunk {19} main.c0317666bd9cf215c3b9.js (main) 1.74 MB [initial] [rendered]
WARNING in Unexpected '}' at 10501:18.
WARNING in Invalid character(s) '}
' at 10501:18. Ignoring.
WARNING in Invalid property name '0% {
opacity' at 10495:2. Ignoring.
Have been looking in the source, but there are too many occurences of 'opacity'.
I only had 4 generated files which have more than 10000 lines, but didn't find the failure.
Using ng build --prod --verbose did not provide more information.
How can I figure out the location of these errors?
How do the line numbers get calculated?
Please provide better error location information.
Just a tip what is going on here, the warnings comes from the clean-css library in node_modules. By searching for the specific warning in that folder you can find the source code that prints it, and alter the message it sends, there are more information in there which can help you find the code in question.
I had an Invalid animation value error that also gave way to little information, but I was able to change the error text to include more of the surrounding code and thus find the erroring animation values (which in my case came from a third party library, so I came no further (apart from reporting it in that library))
Issue - Getting error warning after ng build --prod
Error warning -
WARNING in Invalid property name ' filter' at 29801:2. Ignoring.
WARNING in Invalid property name ' filter' at 29808:2. Ignoring.
WARNING in Invalid property name ' filter' at 29814:2. Ignoring.
WARNING in Invalid property name ' filter' at 29820:2. Ignoring.
WARNING in Invalid property name ' filter' at 29827:2. Ignoring.
WARNING in Invalid property name ' filter' at 29834:2. Ignoring.
I have been looking out the filter keyword in css and HTML, none i found. Later i realise that it comes as property name. Didnt have any clue now to fix this
Thanks for reporting this issue. This issue is now obsolete due to changes in the recent releases as we no longer depend on clean-css.
If the problem persists after upgrading, please open a new issue, provide a simple repository reproducing the problem, and describe the difference between the expected and current behavior.
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
Just a tip what is going on here, the warnings comes from the clean-css library in node_modules. By searching for the specific warning in that folder you can find the source code that prints it, and alter the message it sends, there are more information in there which can help you find the code in question.
I had an Invalid animation value error that also gave way to little information, but I was able to change the error text to include more of the surrounding code and thus find the erroring animation values (which in my case came from a third party library, so I came no further (apart from reporting it in that library))