-
Notifications
You must be signed in to change notification settings - Fork 29.4k
Closed
Labels
UpstreamRelated to using Next.js with a third-party dependency. (e.g., React, UI/icon libraries, etc.).Related to using Next.js with a third-party dependency. (e.g., React, UI/icon libraries, etc.).linear: nextConfirmed issue that is tracked by the Next.js team.Confirmed issue that is tracked by the Next.js team.locked
Description
Verify canary release
- I verified that the issue exists in the latest Next.js canary release
Provide environment information
Operating System:
Platform: win32
Arch: x64
Version: Windows 10 Pro
Binaries:
Node: 18.12.0
npm: N/A
Yarn: N/A
pnpm: N/A
Relevant packages:
next: 13.0.1-canary.4
eslint-config-next: 13.0.0
react: 18.2.0
react-dom: 18.2.0
What browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
Describe the Bug
Any components are producing IDE error but builds successfully.
'SomeComponent' cannot be used as a JSX component.
Its return type 'Promise<Element>' is not a valid JSX element.
Type 'Promise<Element>' is missing the following properties from type 'ReactElement<any, any>': type, props, key `ts(2786)`
Expected Behavior
probably not give an error when using async components
Link to reproduction
no link
To Reproduce
// ~/component/SomeComponent.tsx
export default async function SomeComponent() {
let categories: any = await getCategories()
return ...
}
psugihara, jee-r, bringmetheaugust, diegohaz, matulkum and 88 more
Metadata
Metadata
Assignees
Labels
UpstreamRelated to using Next.js with a third-party dependency. (e.g., React, UI/icon libraries, etc.).Related to using Next.js with a third-party dependency. (e.g., React, UI/icon libraries, etc.).linear: nextConfirmed issue that is tracked by the Next.js team.Confirmed issue that is tracked by the Next.js team.locked