Error: [Link resolver error] Unknown type

My project was running fine, but apparently there have been updates and since then my project has been stuck on the link error.

Already removed the .next/cache

Error

package.json

"dependencies": {
"@fontsource/roboto-mono": "^5.0.18",
"@fontsource/rubik-vinyl": "^5.0.13",
"@fontsource/walter-turncoat": "^5.0.19",
"@prismicio/client": "^7.6.0",
"@prismicio/next": "^1.6.0",
"@prismicio/react": "^2.8.0",
"clsx": "^2.1.1",
"framer-motion": "^11.3.8",
"next": "^14.2.4",
"next-sitemap": "^4.2.3",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-icons": "^5.2.1",
"tailwind-merge": "^2.4.0"
},
"devDependencies": {
"@slicemachine/adapter-next": "^0.3.51",
"@types/node": "^20.14.2",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"autoprefixer": "^10.4.19",
"concurrently": "^8.2.2",
"eslint": "^8.57.0",
"eslint-config-next": "^14.2.4",
"postcss": "^8.4.39",
"slice-machine-ui": "^2.8.1",
"tailwindcss": "^3.4.6",
"typescript": "^5.4.5"
}

Hi @chantal,

This looks like an error with your route resolver which should be declared in prismicio.ts

Apparently, you don't have a type "page" among your custom types, which leads to this error coming from the API. See the route resolver documentation for more info: Route Resolver - Documentation - Prismic

Would you mind double-checking this part of your project? I agree its weird it started suddenly failing after an update though, so please share the content of your prismicio.ts file if the above doesn't help so we can investigate your issue further.

Lucie

Hello,

I am a newbie to all things in the programming world and attempted to do some of the tutorials found on the site and any of them I try to start the localhost:3000 page I get this same issue as chantal. I have tried deleted the .next folder but I can't seem to get anything to start. I am not able to find much out there about this to alleviate the problem and I really want to try these tutorials. Could anyone help me get past this one?

When I run 'npm run dev' it all starts and as soon as I click the localhost:3000 link I get the error.

Error: [Link resolver error] Unknown type
Declared type: page
Expected one of:

[Link resolver error] Unknown type
Declared type: page
Expected one of:

This is all the code that is generated after the initial repo build, I have not changed anything yet.

Thank you in advance for any assistance on this issue.

Neil

Hi @new.support,

Welcome to the community :slight_smile:

Can you try adding documents to your Prismic repository? With at least one that uses the UID home

Thanks.

Thank you for your response, I rebuilt the project after deleting all my files from the initial build on my machine and running thru the quick start guide again and it is all working now. Not exactly sure what I missed but it all started with no issues this time. Looking forward to building this site out using prismic.

Have a great day!

1 Like