Getting error on build

Hello, I'm encountering an error when attempting to run a build process after introducing a new page_type. The issue seems to be resolved when I generate a new access token, but I'm uncertain about the cause. I'm seeking expert assistance to understand and address this problem.

 [Link resolver error] Unknown type
Declared type: case_studies
Expected one of:
- sub_menu
- resources_hub_pages
- page
- hubspot_form
- industry_pages
- solution_pages
- grid_layout
- layout
- product_pages
- settings
- orchestration_platform
- aboutus_logos
- customer_logos
- landing_pages

Hi @webdev3,

Are you using the App Router? It's possible that this is related to caching issues we've been seeing:

In your other thread, I asked if your Route Resolver is up to date. That is typically the cause of this error.

Sam

App router only and shared the details of that thread

Hi @webdev3,

Do you have at least one document published in each document type? An empty type can throw this sort of error, which could also result in previews redirecting to the home page as you described in your other thread.

Sam

I have more than one document sam, I've published the document before running build

Hey @webdev3,

I'm just checking in to see if you made any progress on this error?

A Link Resolver error is usually because your routes array includes a type that doesn't exist in your repository.

Sam

Hie, i am kind of new to prismic, i recently did a project with nextjs 14 and prismic, i have successfully deployed the app on vercel but i recently acquired a custom domain and was hoping to use GitHub pages instead but when trying to deploy the same project with github actions i am getting these errors. The same code builds with no errors on my local host as well as on vercel but fails with the highlighted errors on GitHub when i try to use github actions.


Error: Page with `dynamic = "error"` couldn't be rendered statically because it used `request.url`.``` 

Export encountered errors on following paths:
	/api/exit-preview/route: /api/exit-preview
	/api/preview/route: /api/preview
Error: Process completed with exit code 1.

/**Here is my nextjs.config.mjs */

/** @type {import('next').NextConfig} */
const nextConfig = {};

export default nextConfig;

Hey @delvinshoko,

As far as I understand, GitHub pages only allows static HTML or client-rendered websites. With GitHub, you can't have any server functions. The paths listed in the error message both run logic on the server, and so they wouldn't work on GitHub pages. If you delete those files, it might work, but you won't be able to use Prismic previews.

Sam