Cannot access .propTypes on the server. You cannot dot into a client module from a server component.
Answered
American black bear posted this in #help-forum
American black bearOP
Im using Nextjs 13.4.12 with app router. This happens intermittently on a dynamic page (posts/[id]) where i have marked all the components "use client". Page works most of the time but sometimes throws this error when hosted it on production. Cant reproduce this locally.
Answered by European sprat
Have you tried prod build locally? Have you tried upgrading next?
6 Replies
European sprat
Have you tried prod build locally? Have you tried upgrading next?
Answer
American black bearOP
Yup, i have tried running prod build locally and i dint see any error. Even on production it doesnt happen always. Not sure what triggers this error when that happens. No i didnt try updating the nextjs. Will give that a try.
American black bearOP
Looks like somebody else is seeing a similar error. Even i hosted this on AWS amplify
American black bearOP
If this can help anyone, upgrading to Nextjs 13.4.19 solved this issue. Thank you @European sprat !
@European sprat Have you tried prod build locally? Have you tried upgrading next?
Devon Rex
Same issue faced and solved by upgrading next.js version with 13.4.19.
But why old version does not work and what was the problem?
How new version worked respectedly?
But why old version does not work and what was the problem?
How new version worked respectedly?