If there are unrelated files in the content directory (even if they are not imported anywhere), Nuxt Content will show Document not found error in production.
In the reproduction, I've added content/bad.ts. Dev mode works without errors but the error occurs in production environment.
Additional context
No response
Logs
[nuxt] [request error] [unhandled] [500] Cannot read properties of undefined (reading '_path')
at eval (./.output/server/chunks/runtime.mjs:8344:52)
at Array.find (<anonymous>)
at fetchDirConfig (./.output/server/chunks/runtime.mjs:8344:32)
at eval (./.output/server/chunks/runtime.mjs:8378:63)
at Array.reduce (<anonymous>)
at eval (./.output/server/chunks/runtime.mjs:8378:39)
at async Object.eval [as handler] (./.output/server/chunks/runtime.mjs:8709:21)
at async Object.eval [as handler] (./.output/server/chunks/runtime.mjs:3052:19)
at async Server.toNodeHandle (./.output/server/chunks/runtime.mjs:3318:7)
Environment
Reproduction
https://stackblitz.com/edit/github-xx74jl?file=app.vue
Describe the bug
If there are unrelated files in the
content
directory (even if they are not imported anywhere), Nuxt Content will show Document not found error in production.In the reproduction, I've added
content/bad.ts
. Dev mode works without errors but the error occurs in production environment.Additional context
No response
Logs