Skip to content

[v6] Unable to find CSS for <page>. This is likely a bug in Astro. #15863

@fspoettel

Description

@fspoettel

Astro Info

Astro                    v6.0.2
Vite                     v7.3.1
Node                     v24.11.1
System                   macOS (arm64)
Package Manager          npm
Output                   static
Adapter                  none
Integrations             none

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

When developing an Astro 6 page, any time I create a new page, the development server logs an error and the CSS does not apply to the page. When this happens, I have to restart the development server, after which the changes apply. It only seems to appear when Astro encounters a new page for the first time.

# logged error
[WARN] [assets] Unable to find CSS for <page>. This is likely a bug in Astro.

In this specific project, the CSS is imported from a .css file in a layout wrapper.

Steps to reproduce in the Stackblitz repro:

  1. Start the development server. The page has a red background.
  2. Create a new page with identical structure and navigate to it. It has a white background.
  3. Restart the dev server and navigate to the new page. It has a red background.

What's the expected result?

CSS should immediately load for newly created pages.

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-hyfrklqs

Participation

  • I am willing to submit a pull request for this issue.

Metadata

Metadata

Assignees

Labels

- P3: minor bugAn edge case that only affects very specific usage (priority)pkg: astroRelated to the core `astro` package (scope)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions