You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Contentful throws SyntaxError: Unexpected token ';'. Expected an opening '(' before a method's parameter list. on iPhone 6 iOS 12.5.7 when used in the Pages router in Next.js
However the error does not occur when using the App router (as it runs in a server component).
Version 9.3.5 of the contentful client works as expected.
I fixed this for us by not having any client-side calls to Contentful, and doing everything in getStaticProps and passing down the response via props. If you have deeply nested references, you will want to make sure you use the includes prop on the api call setup and setting it to something high, like 10, so that all your entries get resolved.
@wadehammes thanks for the tip.
although that means a complete refactor of our current code base, so still hoping that the contentful team are able to solve this.
While is also suggest to avoid client side calls to Contentful if you can avoid:
The new v11 should also fix the iOS 12.5.7 issue. Unfortunately, I cant simulate that old phone nor have it available physically. if anyone could test if the issue is gone with v11.. I would be very thankful!
Contentful throws
SyntaxError: Unexpected token ';'. Expected an opening '(' before a method's parameter list.
on iPhone 6 iOS 12.5.7 when used in the Pages router in Next.jsHowever the error does not occur when using the App router (as it runs in a server component).
Version 9.3.5 of the contentful client works as expected.
Steps to Reproduce
Here is a minimal repo: https://github.com/reekrd/contentful-test
The text was updated successfully, but these errors were encountered: