New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Angular 11: Production build Error: Expected a pseudo-class or pseudo-element #19561
Comments
Thanks @JoostK for transferring this issue to appropriate repository! |
In this case we should produce an error with the offending file path. |
The error message 'Expected a pseudo-class or pseudo-element.' may suggest a syntax error of pseudo-classes in one of the CSS files. Example having a space after the + ul li:last-child {
- ul li: last-child { I have a PR in fight to show the file that is causing the error #19568 |
Thanks, @clydin, and @alan-agius4 for the quick fix. However, I'd like to add that I had to make the same change in the JS file instead of the TS file from the PR commit. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
🐞 bug report
Affected Package
Not exactly sure.
Is this a regression?
This bug did not exist in Angular 6.
Description
Recently upgraded from Angular 6 to Angular 11 incrementally using https://update.angular.io. Everything went smooth and Angular runs locally using
ng serve
but when trying to build a production-build usingng serve --prod
it gives just following error:Error: Expected a pseudo-class or pseudo-element.
When using
ng build --prod --verbose=true
, it results in lot of logs similar to:Angular version: 11 and Node version: 12.16.3
🌍 Your Environment
Angular Version:
Anything else relevant?
This bug did not exist in Angular 6 and we followed all the points in https://update.angular.io but still the production build is failing. Unfortunately, there's no specific file that is referred with the error logs even though
verbose=true
is mentioned. Dev mode working perfectly.The text was updated successfully, but these errors were encountered: