its type '() => promise<element>' is not a valid jsx element type #73645
Replies: 3 comments 14 replies
-
This looks like the error we were getting when Server Components where first introduced. Could you check that you have the correct TS version? Perhaps your IDE is running another TS version than the one included into your package.json? |
Beta Was this translation helpful? Give feedback.
-
received the same error after running a npm update. Any ideas how to fix? Also worked without any problems before. |
Beta Was this translation helpful? Give feedback.
-
I have absolutely no idea why this happens. It works perfectly fine in a fresh Next.js project. I can implement an async server component just like this: However, in my actual project, I managed to get it working by making the primary server page itself async and awaiting the component: This feels more like a workaround, as my project is still a WIP, and I don't consider it a permanent solution. Maybe someone knows more about why this happens. |
Beta Was this translation helpful? Give feedback.
-
Summary
I encountered this error after deleting the node_modules folder and reinstalling dependencies. The project has been working fine for over a year with no errors, and I haven't made significant changes to the code.
Additional Context:
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions