Ahmad Awais

NAVIGATE


SHARE


‘Promise‘ is not a valid JSX element | Async React Server Component TypeScript Error in Next.js

Ahmad AwaisAhmad Awais

TypeScript DOES NOT like Async React Server Components in Nextjs — here’s a fix 👊

Hey, developers! Next.js React Server Components are pretty awesome. TypeScript, as you can imagine, has a small issue with them. You might have encountered the “‘Promise<Element>’ is not a valid JSX element type” error. But fret not because there’s a quick fix!

In this OneDevMinute video, I’ll show you a simple workaround to disable type-checking for async Server Components. With one step, you’ll be back on track.

Check out the video now to save time and stay productive! And if you find it helpful, don’t forget to hit that “Subscribe” button and leave a reply.

Happy coding, folks! 

Lovely jubbly, now you know!

 

Founder & CEO of ⌘ Command Code, the most used coding agent for open models: 160K+ users, 50K+ paying customers. Founded Langbase (AI cloud for agents with memory & tools).

"What an awesome example for developers." — Satya Nadella, CEO of Microsoft, on my NASA Ingenuity code.

NASA Ingenuity Mars Helicopter code contributor · 6× GitHub Star, one of the first 8 Gold Stars · #1 trending JavaScript developer on GitHub · 6× Google Developer Expert · 6× Microsoft MVP.

Ex VP DevRel & DevTools at RapidAPI · Google Developers Advisory Board (gDAB) founding member · OpenAPI Business Governing Board, Linux Foundation · SF DevNetwork AI/ML Advisory Board · Angel investor (Replit, Resend, Daytona, Gumroad and you?).

Award-winning open source engineering leader: 300+ projects, 50–100M downloads a year, including Shades of Purple (5M+ developers) and corona-cli (10B+ queries).

Taught 217K+ developers via NodeCLI.com and VSCode.pro. 160+ talks. Blogging since 2000, billions of views.

❯ Read more about Ahmad Awais or come say hi on 𝕏 @MrAhmadAwais.

Newsletter

The Developer Takeaway

Founder notes on AI, dev tools, and building developer products. No spam.

247,813+ developers subscribed
Comments 0
There are currently no comments.