4

Does anyone else encounter the same issue with intercepting routes, (modal), and `generate static params`? everything works fine when running `npm run dev`, but after building and running `npm run start`, the modal doesn't work, and instead of displaying the modal, it returns the route itself. The same problem with more details happened with someone else but didn't solved issue link is here: [Next.js Issue].

I deployed it on vercel and it didn't work .

When I remove the generate static params the modal works fine but I can't remove this as it is important for data fetching ( I use dynamic routes to get product by id )

1 Answer 1

0

It looks like intercepting routes are officially not supported with static exports, since they require a running server. Docs: https://github.com/vercel/next.js/blob/7e093afb8cb1324b2aae6a16fd8b2b6e3cc577a5/docs/01-app/02-guides/static-exports.mdx?plain=1#L292

which was clarified in

https://github.com/vercel/next.js/pull/75058

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.