An invalid Prismic repository name was given

Hey @hi16, One of my colleagues was able to spot something in the code you shared:

You're importing createClient() from @prismicio/client from the page.js file. Instead, it should be imported from prismicio.js. Like this:

import { createClient } from "../prismicio";

The createClient() from prismicio.js already has the Prismic repository’s endpoint configured and is enhanced to support Next.js’s Preview Mode via the previewData option. With that import change, the “Invalid Prismic repository name” error should go away.