Skip to content

[BUG] OpenGraph Types #92

Open
Open
@dimitrisganotis

Description

@dimitrisganotis

Bug report

Required System information

  • Node.js version: v20.15.1
  • NPM version: v10.9.0
  • Strapi version: v5.3.0
  • Database: MySQL 8
  • Operating system: Ubuntu 22.04
  • Is your project Javascript or Typescript: Typescript
  • SEO Plugin version: v2.0.4

Describe the bug

When I try to generate the types, I get an error.

strapi ts:generate-types

[INFO] [2024-11-14T15:26:40.452Z] (Typegen) Starting the type generation process
[INFO] [2024-11-14T15:26:40.452Z] (Typegen) Generating types for contentTypes
[INFO] [2024-11-14T15:26:40.668Z] (Typegen) Generating types for components
[ERROR] [2024-11-14T15:26:40.713Z] (Typegen) Failed to generate types for components: ';' expected. (1020:23)
1018 | };
1019 | attributes: {

1020 | og:description: Schema.Attribute.String & Schema.Attribute.Required & Schema.Attribute.SetMinMaxLength<{
| ^
1021 | maxLength: 200;
1022 | }>;
1023 | og:image: Schema.Attribute.Media<"images">;. Exiting
[INFO] [2024-11-14T15:26:40.713Z] (Typegen) The task errored with 0 warning(s) and 1 error(s) in 0.261s.
[2024-11-14 16:26:40.713] info: Shutting down Strapi
[2024-11-14 16:26:40.715] info: Strapi has been shut down

It seems that the new open-graph component doesn't have valid attribute names. A solution would be to remove the "og:" from the attributes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions