Closed
Description
Hello,
I've created a fresh project with the latest Nuxt.js and @nuxt/content module.
-
When I starting I have the warning:
Could not parse ./content/index.md: node.children.flatMap(...) is not a function or its return value is not iterable
-
I'm trying to get a content from index.md but it's error. I don't know why.
Example of code:
async asyncData({ $content, params, error }) {
const slug = params.slug || 'index'
const page = await $content(slug)
.fetch()
.catch(() => {
error({ statusCode: 404, message: 'Page not found' })
})
return {
page,
}
},
Do you know what is happening with it?
Version
@nuxt/content: ^1.11.1
nuxt: ^2.14.12
What is Expected?
I would get a content from index.md
What is actually happening?
I can't get any content from index.md