Route interceptor not working with Next15
Answered
Da_v_id posted this in #help-forum
Da_v_idOP
Hi,
I have updated my project to nextjs 15 and my route inteceptor stopped working.
It still works with
I have updated my project to nextjs 15 and my route inteceptor stopped working.
It still works with
pnpm dev --turbo
but it doesn't work after I build the project. I basically followed this guide https://nextjs.org/docs/app/building-your-application/routing/intercepting-routes to show the route as a modal/dialog when I click a button, but still open it as a fullpage when i navigate to the URL. So the form renders properly when i navigate to the route, but it shows this error screen when i click on the button, and there is nothing in the logs.Answered by Da_v_id
Not sure why it was working on Nextjs 14, but to fix it on Nextjs 15 i had to add
export const dynamic = "force-dynamic";
ot top of my @modal/(.)create/page.tsx file1 Reply
Da_v_idOP
Not sure why it was working on Nextjs 14, but to fix it on Nextjs 15 i had to add
export const dynamic = "force-dynamic";
ot top of my @modal/(.)create/page.tsx fileAnswer