Prerequisites
Ionic Framework Version
v8.x
Current Behavior
I'm encountering an error related to adoptedStyleSheets in my Angular 18 and Ionic project. The console shows the following error:
TypeError: Failed to set the 'adoptedStyleSheets' property on 'Document': Failed to convert value to 'CSSStyleSheet'.
Expected Behavior
The application should run without any errors related to adoptedStyleSheets.
Steps to Reproduce
- Clone the repository: git clone https://github.com/papastepano/try-ionic
- Install dependencies: npm install
- Run the development server: ng serve
- Open the application in a browser and check the console for the error.
Code Reproduction URL
https://github.com/papastepano/try-ionic
Ionic Info
Ionic:
Ionic CLI : 7.2.0 (C:\Users\DELL\AppData\Roaming\npm\node_modules@ionic\cli)
Ionic Framework : @ionic/angular 8.2.1
@angular-devkit/build-angular : 18.0.3
@angular-devkit/schematics : 18.0.3
@angular/cli : 18.0.3
@ionic/angular-toolkit : 11.0.1
Utility:
cordova-res : not installed globally
native-run : not installed globally
System:
NodeJS : v20.11.0 (C:\Program Files\nodejs\node.exe)
npm : 10.4.0
OS : Windows 10
Additional Information
I suspect this might be due to browser compatibility or an issue with how CSSStyleSheet is being used in the project. Any insights or fixes would be appreciated.
Feel free to create a PR to the repo if you have a suggestion
Prerequisites
Ionic Framework Version
v8.x
Current Behavior
I'm encountering an error related to adoptedStyleSheets in my Angular 18 and Ionic project. The console shows the following error:
TypeError: Failed to set the 'adoptedStyleSheets' property on 'Document': Failed to convert value to 'CSSStyleSheet'.Expected Behavior
The application should run without any errors related to
adoptedStyleSheets.Steps to Reproduce
Code Reproduction URL
https://github.com/papastepano/try-ionic
Ionic Info
Ionic:
Ionic CLI : 7.2.0 (C:\Users\DELL\AppData\Roaming\npm\node_modules@ionic\cli)
Ionic Framework : @ionic/angular 8.2.1
@angular-devkit/build-angular : 18.0.3
@angular-devkit/schematics : 18.0.3
@angular/cli : 18.0.3
@ionic/angular-toolkit : 11.0.1
Utility:
cordova-res : not installed globally
native-run : not installed globally
System:
NodeJS : v20.11.0 (C:\Program Files\nodejs\node.exe)
npm : 10.4.0
OS : Windows 10
Additional Information
I suspect this might be due to browser compatibility or an issue with how CSSStyleSheet is being used in the project. Any insights or fixes would be appreciated.
Feel free to create a PR to the repo if you have a suggestion