Not be able to fetch data from prismic api. Changes in prismic not appearing on my website

Hi, I'm new to prismic from Japan,
I'm creating a website using prismic and next.js(App router).

I changed a few things in prismic and published them, but the changes wouldn't appear on my website.
I checked prismic api endpoint and I got error messages.

the error messages are;

I have no idea what to do. Could anyone help me?
Thank you in advance.

<My website settings>

  • Repository security ( API access ) is;
    Public API for Master only - Require an access token to preview future releases.
  • Permanent access tokens is;
    published.

<My code settings>

.env.local

PRISMIC_ACCESS_TOKEN=*****************

prismic.js

export const createClient = ({ config }) => {
  const client = prismic.createClient(repositoryName, {
    routes,
    accessToken: process.env.PRISMIC_ACCESS_TOKEN,
    fetchOptions:
      process.env.NODE_ENV === 'production'
        ? { next: { tags: ['prismic'] }, cache: 'force-cache' }
        : { next: { revalidate: 5 } },
    ...config,
  });

  prismicNext.enableAutoPreviews({ client });

  return client;
};

I've already checked this post.

Hi Yusuke,

I have no problem access your repos and their data here:
https://ma-net.prismic.io/api/v2/documents/search?ref=ZZj2FxEAAB4AqJCf&src=apibrowser#format=json

https://cms-prismic-headless.prismic.io/api/v2/documents/search?ref=ZYGTtREAACQAuocJ&src=apibrowser#format=json

I'm not sure why you're seeing GraphQL and IF messages here, are you using GraphQL?

Thank you for replying.
I hadn't checked it. Now I started local server and did not get the error like you.
I'm not sure the reason, but I'll keep creating the website.
I appreciate your support.

1 Like