histoire-dev / histoire-dev/histoire

Error: Could not parse CSS stylesheet

Open
#557 2 comments 1 reaction 0 assignees View on GitHub
to triage
Dominant language
TypeScript
Stars
3.6k
Forks
212
PR merge metrics
No merged PRs in 30d

Description

### Describe the bug

JSDOM doesn't understand CSS well

Error: Could not parse CSS stylesheet

![image](https://github.com/histoire-dev/histoire/assets/62594983/0cd068c5-c4ff-4494-86d5-6617eedc5838)

![image](https://github.com/histoire-dev/histoire/assets/62594983/af1df7d7-b9b7-401f-8871-ae3eee6e2054)

[Similar error](https://github.com/histoire-dev/histoire/issues/466)

### Reproduction

https://github.com/teleskop150750/Histoire

### System Info

```shell
Windows 11, Google Chrome 114
```

### Used Package Manager

pnpm

### Validations

- [X] Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/histoire-dev/histoire/discussions).
- [X] Read the [Contributing Guidelines](https://github.com/histoire-dev/histoire/blob/main/CONTRIBUTING.md).
- [X] Follow our [Code of Conduct](https://github.com/histoire-dev/histoire/blob/main/CODE_OF_CONDUCT.md)
- [X] Read the [docs](https://histoire.dev/guide/).
- [X] Check that there isn't [already an issue](https://github.com/histoire-dev/histoire/issues) that reports the same bug to avoid creating a duplicate.
- [X] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.

Contributor guide

Open the contributing guide

Research direction

Start by running the linked Histoire reproduction with pnpm and compare the reported JSDOM stylesheet parse error with similar issue #466. Trace which stylesheet or component triggers the error, then verify that the reproduction no longer reports the parse failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.