Rules skipped due to selector errors: legend+* -> Cannot read property 'type' of undefined
See original GitHub issueBug description:
When building angular using the production
configuration, the step Generating index html...
produces following warning:
1 rules skipped due to selector errors: legend+* -> Cannot read property 'type' of undefined
See this screenshot:
Reproduction Steps
In Terminal:
ng new testproject --style scss
cd testproject
ng add @ng-bootstrap/ng-bootstrap
npm run build
Versions of Angular, ng-bootstrap and Bootstrap:
Angular: 13.3.0 - 13.3.2
ng-bootstrap: 12.0.2
Bootstrap: 5.1.3
Issue Analytics
- State:
- Created a year ago
- Reactions:20
- Comments:57 (1 by maintainers)
Top Results From Across the Web
Warning: 1 rules skipped due to selector errors: legend + ...
In the angular.json file write the following code, under "production". "optimization": { "scripts": true, "styles": { "minify": true, ...
Read more >Angular Universal 'Rules skipped due to selector errors' - Reddit
... error when running ssr: 2 rules skipped due to selector errors: legend+* -> Cannot read properties of undefined (reading 'type').
Read more >legend * -> cannot read properties of undefined (reading 'type')
This error occurs when attempting to read a property of an undefined variable. It typically means that the variable in question has not...
Read more >MDB4 with Angular12 css skipped rules
8 rules skipped due to selector errors: ... Topic: MDB4 with Angular12 css skipped rules ... Cannot read properties of undefined (reading 'type') ......
Read more >Problem running Build command: npm run prerender - Support
11:48:03 PM: 2 rules skipped due to selector errors: 11:48:03 PM: legend+* -> Cannot read properties of undefined (reading 'type') 11:48:03 PM: .table>>>* ......
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
Had the same issue. Managed to solve it by replacing
"optimization": true
inangular.json
withAs suggested in https://mdbootstrap.com/support/angular/angular-12-production-build-warning-mdb4-12/
It’s because you installed bootstrap and ng-bootstrap