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.
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
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 Let us know if you run into more issues, and happy developing!
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)
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!