Can't read property of undefined when refreshing page

I created a website with Nuxt and deployed it on Netlify and noticed weird issues I'm trying to fix with no luck.


The content on these 2 pages are hosted on Prismic:
About: About ByeIndonesia
SAKE Guide: SAKE Guide 2021 - ByeIndonesia

If you navigate the home page and click on the link on the main navigation, everything works fine. There's no error reported on the console.

However, if you try to access the "About" or "SAKE Guide" page directly, or simply refresh the browser when you're on the page. You'll see an error in the console.

This error only shows up when you go to the page directly or when you refresh the page.

Any idea how to get rid of it?

Hello Yuyu,

Welcome to the Prismic Forum and thanks for reaching out to us.

I need more information:

  • Are you using the fetch () hook to retrieved data from the API?

I am looking forward to hearing from you back.


I have to keep the repo private to prevent my api key from getting exposed by serverless function

It would be better if you can send me the URL of your repo. You can send me a private message too.

Thanks, sending you my repo privately.

Thanks. I have received your messgae. I am looking into it. I will come to you shortly.

It somehow resolves by itself as I'm tidying up my repo.

Now I don't see the error on console when I refreshed the page anymore.


I am glad that It's working for you. Don't hesitate to reach out to us If you have any questions.



This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.