Skip to content

Missing the following properties from type 'ReactPortal': children, key #765

Description

@eerison

Bug report

Would this issue be related with satori? when I add pnpm add @astrojs/react, I am getting the issue bellow

src/pages/og.png.ts:27:5 - error ts(2345): Argument of type '{ type: string; props: { style: { background: string; width: string; height: string; display: string; alignItems: string; just
ifyContent: string; fontFamily: string; }; children: ({ type: string; props: { ...; }; } | { ...; })[]; }; }' is not assignable to parameter of type 'ReactNode'.
  Type '{ type: string; props: { style: { background: string; width: string; height: string; display: string; alignItems: string; justifyContent: string; fontFamily: string; }; children: 
({ type: string; props: { ...; }; } | { ...; })[]; }; }' is missing the following properties from type 'ReactPortal': children, key

 27     {
        ~
 28       type: "div",
    ~~~~~~~~~~~~~~~~~~
... 
140       },
    ~~~~~~~~
141     },
    ~~~~~

src/pages/posts/[...slug]/index.png.ts:48:5 - error ts(2345): Argument of type '{ type: string; props: { style: { background: string; width: string; height: string; display: string; align
Items: string; justifyContent: string; }; children: ({ type: string; props: { style: { position: string; ... 10 more ...; height: string; }; }; } | { ...; })[]; }; }' is not assignable to
 parameter of type 'ReactNode'.
  Type '{ type: string; props: { style: { background: string; width: string; height: string; display: string; alignItems: string; justifyContent: string; }; children: ({ type: string; pro
ps: { style: { position: string; ... 10 more ...; height: string; }; }; } | { ...; })[]; }; }' is missing the following properties from type 'ReactPortal': children, key

 48     {
        ~
 49       type: "div",
    ~~~~~~~~~~~~~~~~~~
... 
168       },
    ~~~~~~~~
169     },
    ~~~~~

code: https://github.com/satnaing/astro-paper/blob/main/src/pages/og.png.ts#L28

Additional Context

Satori version 0.26.0

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