zce / velite

Turns Markdown / MDX, YAML, JSON, or others into app's data layer with Zod schema.
http://velite.js.org
MIT License
341 stars 19 forks source link

Property 'description', 'title', does not exist on type '{ slug: string; } & { slugAsParams: string; }'.ts(2339) #169

Closed antoineross closed 1 week ago

antoineross commented 3 weeks ago

Has anyone gotten this same error when trying to compile the /docs page?

I keep running into this error, but don't get the same issue from /blog. The only issue is in (docs)/docs/[[...slug]]/page.tsx which is copy-pasted from the zce/taxonomy repo.

I have tried the zce/taxonomy and it works very well. So far I have copied a very similar velite.config.ts, exactly same docs folder and content. Is there anything I'm missing, like a global config?

zce commented 3 weeks ago

You may need to provide a repro repository.

Just infer from your error message, if your schema configuration is correct, you need to check whether the final output json meets your expectations

zce commented 1 week ago

ping @antoineross

antoineross commented 1 week ago

Noticed that the issue was from my build, which wasn't running properly at the time. Will close this issue now. Thanks for the help