Skip to content

Build fails when data-store.json exceeds a certain size #13360

Open
@justin5267

Description

@justin5267

Astro Info

Astro                    v5.4.1
Node                     v22.14.0
System                   Windows (x64)
Package Manager          pnpm
Output                   static
Adapter                  none
Integrations             @astrojs/starlight
                         @astrojs/sitemap

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

No response

Describe the Bug

Description:

When the size of data-store.json exceeds a certain threshold(540256 KB), the build process fails with the error: The collection "docs" does not exist or is empty. Please check your content config file for errors.

Steps to Reproduce:

  1. Modify SAVE_DEBOUNCE_MS=5000 to ensure data-store.json is fully written.

  2. Run pnpm run build. The build succeeds, and data-store.json is 540095 KB.

  3. Remove the prefix "_" from "src/content/docs/6.审判参考/Y.地方审判/Y28.甘肃审判专题/_yxx8-1.md" (76 KB), which will include one more file in the build process.

  4. Run pnpm run build again. The build fails with the error: The collection "docs" does not exist or is empty. Please check your content config file for errors., and data-store.json is now 540256 KB.

What's the expected result?

The build should succeed regardless of the size of data-store.json.

Link to Minimal Reproducible Example

https://github.com/justin5267/test

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)feat: content layerRelated to the Content Layer feature (scope)requires refactorBug, may take longer as fixing either requires refactors, breaking changes, or considering tradeoffs

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions