When using [slug].vue and the following script, I'm getting page not found. I had set up a pages collection in Directus with a slug manual input field. One of the pages slugs is called, about.
Visiting http://localhost:3000/about leads to Page Not Found.
<script setup>
const { $directus } = useNuxtApp()
const route = useRoute()
const { data: page } = await useAsyncData('page', () => {
return $directus.items('pages').readOne(route.params.slug)
})
if (!page.value) throw createError({
statusCode: 404,
statusMessage: 'Page Not Found'
})
</script>