You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
failure (and poor error message) if fields is missing from defineDocument #268
But got a pretty cryptic error when spinning it up, prefaced by This error shouldn't have happened. Please consider opening a GitHub issue with the stack trace below here: https://github.com/contentlayerdev/contentlayer/issues.
The documentation doesn't say that fields is required:
However, when I changed contentlayer.config.js to .ts, it complained that fields was missing, and I was able to resolve the issue pretty trivially:
Not sure if the documentation (where it's optional) is the intended behavior, or if the code is functioning correctly and friendlier errors/clearer docs would be helpful, but sharing the discrepancy :)
Activity
Allow document definitions with no field definition - see #268
schickling commentedon Aug 5, 2022
This should be addressed with the
0.2.7release. 🎉