metadata disallowed in client components - Root layout
Answered
Spinge Bib Sqorpnts posted this in #help-forum
Hello! My root layout does not have a "use client" directive at the top, yet after updating to 13.5.1, the compiler says that I'm trying to export "metadata" from a component marked with "use client", even though it isn't.
Reverting to 13.4 fixes the issue
Reverting to 13.4 fixes the issue
Answered by Spinge Bib Sqorpnts
Figured out the answer.
Importing something in a client components that is exported from a server component causes the compiler to fail, but it won't give you the correct reason.
Importing something in a client components that is exported from a server component causes the compiler to fail, but it won't give you the correct reason.
3 Replies
Tried to remove everything I've added in the layout file, to no avail
Also tried deleting the .next directory
Figured out the answer.
Importing something in a client components that is exported from a server component causes the compiler to fail, but it won't give you the correct reason.
Importing something in a client components that is exported from a server component causes the compiler to fail, but it won't give you the correct reason.
Answer