-
-
Notifications
You must be signed in to change notification settings - Fork 78.8k
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
Selector errors #37116
Comments
Thanks for opening this issue @lightbulb110. Do you see the same thing with the 5.2.1 of Bootstrap as well? Could be a duplicate of #36136. |
Yes, same issue with 5.2.1 |
$ npm i -g @angular/cli@14
$ ng new my-app
? Would you like to add Angular routing? Yes
? Which stylesheet format you would like to use? SCSS
$ cd my-app
$ ng add @nguniversal/express-engine
$ npm i bootstrap In "styles": [
"src/styles.scss",
"node_modules/bootstrap/dist/css/bootstrap.css"
],
"scripts": [
"node_modules/bootstrap/dist/js/bootstrap.js"
] Modified the The page is displayed correctly and the accordion works as expected.
@lightbulb110 Do you confirm the steps, the configuration and the error. Same issue as yours? |
Right on, you got it. |
@XhmikosR Is this fixed? |
Just some information regarding this issue for the one searching into our repository. Some modifications in So nothing to fix on our side. |
Yeah, see @julien-deramond's answer. I too would like this to be sorted since I'm hitting this myself, but it's not an issue we can fix ourselves. |
For reference, this is the root cause: GoogleChromeLabs/critters#103 |
Prerequisites
Describe the issue
Whenever bootstrap.min.css is included in the angular build, we get a "Selector Error" during server side rendering (with angular universal). The error message is: "Cannot read properties of undefined (reading 'type')"
"dependencies": {
"@angular/animations": "^14.0.0",
"@angular/common": "^14.0.0",
"@angular/compiler": "^14.0.0",
"@angular/core": "^14.0.0",
"@angular/forms": "^14.0.0",
"@angular/platform-browser": "^14.0.0",
"@angular/platform-browser-dynamic": "^14.0.0",
"@angular/platform-server": "^14.0.0",
"@angular/router": "^14.0.0",
"@nguniversal/express-engine": "^14.2.0",
"bootstrap": "^5.2.0",
"express": "^4.15.2",
"rxjs": "~7.5.0",
"tslib": "^2.3.0",
"zone.js": "~0.11.4"
},
Angular CLI: 14.2.1
Node: 16.15.0
Package Manager: npm 8.5.5
OS: win32 x64
Angular: 14.2.0
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, platform-server
... router
Package Version
@angular-devkit/architect 0.1402.1
@angular-devkit/build-angular 14.2.1
@angular-devkit/core 14.2.1
@angular-devkit/schematics 14.2.1
@angular/cli 14.2.1
@nguniversal/builders 14.2.0
@nguniversal/express-engine 14.2.0
@schematics/angular 14.2.1
rxjs 7.5.6
typescript 4.7.4
Reduced test cases
I was able to recreate the error by creating a new angular universal project and including the bootstrap library.
What operating system(s) are you seeing the problem on?
Linux
What browser(s) are you seeing the problem on?
Chrome
What version of Bootstrap are you using?
5.2.0
The text was updated successfully, but these errors were encountered: