Next.js Discord

Discord Forum

How to solve Warning: Only plain objects can be passed to Client Components from Server Components.

Answered
Md.Mohon posted this in #help-forum
Open in Discord
When I am run my next 14 app router app then show this warning in my vs code console. how to solve it? cause i am not use any plain objects but i see this error show from Image Component.
Answered by joulev
looks like assets.images.newArrived.default will do the trick
View full answer

7 Replies

Polar bear
You are passing a module inside the image source. What does that Module contain?
is dynamic image i passed

like
And some of time import a local image and use this type
looks like assets.images.newArrived.default will do the trick
Answer
if you don't want to do it (me neither), use import instead of require
just put the import statements at the top
Ohh Thanks it's solved