Hello! Ty for this great tutorial! I have a problem. When I generate the types, it doesn't come with the sections in it. It throws an Error on the export saying that the type is missing the fields and contentTypeId. Can you help me pls? this is what it generates: import type { Asset, Entry, EntryFields } from "contentful"; export interface TypeAuthorFields { name: EntryFields.Symbol; description: EntryFields.Text; avatar: Asset; } export type TypeAuthor = Entry;
`cf-content-types-generator` did not receive an update in a long time, but the `contentful` package did. So, they are out of sync right now. Downgrade to like _10.0.0-beta-v10.8_ the `contentful` package and you should be good to go.
This is awesome. I was tired of trying to figure it out how to write all the types properly. Now we can do it automatically!
Thanks very helpful, I had to add a --v10 argument when generating the types to make it play nicely with v10 of the contentful SDK
Hello! Ty for this great tutorial! I have a problem. When I generate the types, it doesn't come with the sections in it. It throws an Error on the export saying that the type is missing the fields and contentTypeId. Can you help me pls? this is what it generates:
import type { Asset, Entry, EntryFields } from "contentful";
export interface TypeAuthorFields {
name: EntryFields.Symbol;
description: EntryFields.Text;
avatar: Asset;
}
export type TypeAuthor = Entry;
`cf-content-types-generator` did not receive an update in a long time, but the `contentful` package did. So, they are out of sync right now.
Downgrade to like _10.0.0-beta-v10.8_ the `contentful` package and you should be good to go.