Link Resolver and Slicemachine are not synced up

Hey !

Using NextJS 15.4.6 and latest stable node version.

I am trying to add some routes to my Prismic project, but I am having a weird issue where the Link Resolver does not seem to be “synced” with my custom types, As you can see in the screenshots provided: regionsPage does exists but the Link resolver complains about it,

I did previously call that particular page regionPage and later changed it to regionsPage.

I tried restarting my development server, slicemache and running ``prismic-ts-codegen` but that didn’t help. All of my changes in Slicemachine are live as well.

Any idea how I can navigate this ?

Thanks for the help :grin:

Here is the error I am getting from NextJS:

Here is my package.json:

Hi @tlkernos,

Welcome to our community :slight_smile:

Looking at the error you get, I think this is likely because you can’t change the API id of a type after its creation. You can change its name, but the way it needs to be called will remain the first thing you called it. Have a look at your slice machine, in your custom types view, if you click “rename type” you’ll see the API id doesn’t change. It probably still is regionPage. You’d have to recreate a custom type if you want it to be referred to as regionsPage.

Hope that helps, and let me know if you have anymore questions :slight_smile:

Hi !

Thank you for the quick reply !

I did change my API ID in Slicemachine, and even deleted and re-added it multiple times. Looks like it still isn't syncing up.

Here's a screenshot of my Slicemachine page types:

Well, re-starting my development server did the trick this morning. I do not have the Link Resolver error anymore and everything works as expected.

Do you have any idea why it wasn't working previously ? Is there, perhaps, a command I can run to make my Route resolver re-evaluate my custom types ?

Thank you guys for you help !

1 Like

Thanks for sharing the solution! Maybe something to do with the cache holding on to outdated information? Could be something like that, it would’ve been the next thing I offered to try :slight_smile: Let us know if you run into more issues, and happy developing!

1 Like

Hello,

I have the same issue again. This is quite upsetting. My Route Resolver isn't recognizing that I created two more types professionsPage and professions. As you can see in the screenshots provided, these types exist, but the server isn't recognizing them. I did clear the cache. What can I do here ? Will they magically appear again tomorrow morning ?

I need to deliver these pages ASAP and it is frustrating have to deal with this every time I make changes to my Route Resolver.

Here are the screenshots:
(typescript knows about my types)


Hey @tlkernos,

If this is still an issue – have you published anything with these types, or have they just been created in the Slice Machine? This might be what’s making the difference. Let me know!