bitcraft3r / bolt-boilerplate-nextjs

Supercharge your Next.js projects with Bolt Boilerplate: Convex-powered real-time interactions, Clerk authentication, and Shadcn UI. Setup in minutes.
https://getbolt.vercel.app
17 stars 2 forks source link

Async Client Component #6

Open FleetAdmiralJakob opened 1 month ago

FleetAdmiralJakob commented 1 month ago

The component in ./app/(crud)/post/[id]/page.tsx is a client component.

This is not allowed https://nextjs.org/docs/messages/no-async-client-component.

image

I found this when running pnpm build (for you it must be npm build)

Possible fix

Remove "use client" from the top of the file

bitcraft3r commented 1 month ago

Last time I tried removing "use client" on this page it would break the app. Not sure why.

Maybe solution is in writing the code slightly differently, referencing original source for code on this page: https://github.com/get-convex/convex-nextjs-app-router-demo/blob/main/app%2Fpost%2F%5Bid%5D%2Fpage.tsx.