-
Notifications
You must be signed in to change notification settings - Fork 117
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
TypeError: Failed to set the 'adoptedStyleSheets' property on 'ShadowRoot' #574
Comments
Which Chrome version did you experience this on? I couldn't see the same error on Chrome 114. |
Ah, I just noticed "Chrome 113" in the screenshot. Do you still have this issue? @munkk |
Hi @muratcorlu, I have the same issue in both Chrome and Microsoft Edge. I think it's not related to browser itself. Do you have an idea how can I fix this? |
Hi everyone, I'm encountering the same error as described. To provide more insights, this issue occurs exclusively on Windows systems and specifically when the build is performed on Windows. Interestingly, the error appears only within the stories and not the documentation files. It also seems to be unrelated to Storybook, as the same issue arises in the Playground environment following a Windows build. I hope this additional information helps in diagnosing the problem. |
I'm still investigating. The error occurs in caused by the line
I think it's here : https://github.com/lit/lit/blob/main/packages/reactive-element/src/css-tag.ts#L175-L177 |
Hi yes, you are right, I am facing the same issue with |
Hi, yes i found a workaround. I moved all my Then I did like this for the CSS : import { css } from "lit";
export default css`
:host {
font-family: var(--font-family);
--card-padding: var(--grid-gutter-compact) var(--grid-margin-comfy);
}
...
` Then in the component [...]
import style from "./card.css";
@customElement("card")
export default class Card extends LitElement {
static styles = style;
} |
Hello, has anyone faced this issue?
Uncaught TypeError: Failed to set the 'adoptedStyleSheets' property on 'ShadowRoot': Failed to convert value to 'CSSStyleSheet'.
To Reproduce
Steps to reproduce the behavior:
Node version: 16.20 .
Browser: Chrome.
Branch: main / next
The text was updated successfully, but these errors were encountered: