-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Seeing an Error "Cannot access .propTypes on the server" after updating to Next.js v13.4.12 #192
Comments
I also had this issue. I guess it is related to contentlayer related pages. You can try to create a client component to render the blog post details and use this component in the blog post detail page. Same logic for other mdx related pages. |
This is a known issue. If you have components like |
The culprit is the
|
I had the same error yesterday, and found already an issue created in the Contentlayer repo. It looks that the props passed to Next Image are not read properly by Contentlayer with Nextjs 13.4, either downgrade to 13.3 or change the way you pass Image component on your
Originally posted by @jdharms in contentlayerdev/contentlayer#506 (comment) |
I haven't tested it out, but that seems like the best solution, as it appears to maintain complete functionality of the Next Image component. I hadn't had a chance to test out my prior solution to see if the Image component was functioning as intended, and I think using a pure |
i opened a PR with the correction |
This solution worked for me |
Bug:
On loading the guides or the blog pages getting an 'Unhandled Runtime Error'
Error: Cannot access .propTypes on the server. You cannot dot into a client module from a server component. You can only pass the imported name through.
This occurs after updating next.js from v13.3.2-canary.13 to Next.js v13.4.12. The rest of the app works - how to resolve?
The text was updated successfully, but these errors were encountered: