withastro / astro

The web framework for content-driven websites. ⭐️ Star to support our work!
https://astro.build
Other
45.85k stars 2.41k forks source link

The collection "blog" does not exist or is empty with `contentCollectionCache` enabled under astro 5 beta. #12065

Open oxSaturn opened 5 days ago

oxSaturn commented 5 days ago

Astro Info

Astro                    v5.0.0-beta.2
Node                     v18.20.3
System                   Linux (x64)
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 building the site with npm run build, I would run into this error:

The collection "blog" does not exist or is empty with contentCollectionCache enabled.

What's the expected result?

I would expect the build to proceed without the problem.

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-9pytya?file=src%2Fcontent%2Fconfig.ts,src%2Fdata%2Fblog%2Ftest.md,src%2Fpages%2Fblog%2F[...slug].astro,src%2Fpages%2Findex.astro,astro.config.mjs&on=stackblitz

Participation

florian-lefebvre commented 2 days ago

Experimental Content Collections Cache will soon be removed (likely in the next 5.0 beta), in favor of Content Layer