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:
Are you using the App Router? It's possible that this is related to caching issues we've been seeing:
Perhaps it would be helpful, if you could extend the
Next.js / Deploy documentation with the most proven deployment methods (in addition to the blog post).
Especially for those who are new to Prismic and the App Router, it might be difficult to find the best way to deploy the projects.
I now use on-demand revalidation with a webook to /api/revalidate to reflect quick changes, but still trigger a rebuild of the application to rebuild my sitemap (app/sitemap.js) too.
If anyone has a better appr…
other thread, I asked if your Route Resolver is up to date. That is typically the cause of this error.
App router only and shared the details of that thread
Is your route resolver up to date with route objects for all of the routes on your website?
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.
I have more than one document sam, I've published the document before running build
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.