Skip to content

Too many open files / UnknownContentCollectionError: site does not build #7073

@fviolette

Description

@fviolette

What version of astro are you using?

2.4.5

Are you using an SSR adapter? If so, which one?

None

What package manager are you using?

pnpm

What operating system are you using?

Mac

What browser are you using?

Chrome

Describe the Bug

Site does not build using Astro 2.4.5 (with the latest MDX integration).
The issue seems to start with Astro 2.4.4.

I've used the docs site as an example.
My private site has the same issue.

EMFILE: too many open files, open '/home/projects/github-xwpzeh/src/pages/[lang]/[...slug].astro'

UnknownContentCollectionError: [object Object]
    at Module.getEntrySlug (file://file:///home/projects/github-xwpzeh/node_modules/.pnpm/astro@2.4.5_@types+node@18.6.4_sass@1.54.3/node_modules/astro/dist/content/utils.js:298:11)
    at async eval (file://file:///home/projects/github-xwpzeh/node_modules/.pnpm/astro@2.4.5_@types+node@18.6.4_sass@1.54.3/node_modules/astro/dist/content/vite-plugin-content-virtual-mod.js:99:20)
    at async Promise.all (index 103)
    at async getStringifiedLookupMap (file://file:///home/projects/github-xwpzeh/node_modules/.pnpm/astro@2.4.5_@types+node@18.6.4_sass@1.54.3/node_modules/astro/dist/content/vite-plugin-content-virtual-mod.js:90:3)
    at async Context.load (file://file:///home/projects/github-xwpzeh/node_modules/.pnpm/astro@2.4.5_@types+node@18.6.4_sass@1.54.3/node_modules/astro/dist/content/vite-plugin-content-virtual-mod.js:52:36)
    at async Object.load (file://file:///home/projects/github-xwpzeh/node_modules/.pnpm/vite@4.3.2_@types+node@18.6.4_sass@1.54.3/node_modules/vite/dist/node/chunks/dep-7efa13d7.js:42887:32)
    at async loadAndTransform (file://file:///home/projects/github-xwpzeh/node_modules/.pnpm/vite@4.3.2_@types+node@18.6.4_sass@1.54.3/node_modules/vite/dist/node/chunks/dep-7efa13d7.js:53326:24)

The troubleshooting link provided is https://docs.astro.build/en/reference/errors/unknown-content-collection-error/

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-xwpzeh?file=package.json

Participation

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

Metadata

Metadata

Assignees

Labels

- P4: importantViolate documented behavior or significantly impacts performance (priority)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions