Next.js Discord

Discord Forum

Next JS Static Pages - Links Stop Working

Unanswered
Turkish Angora posted this in #help-forum
Open in Discord
Turkish AngoraOP
Hey Guys I am facing some issues when trying to convert some pages to static pages, in dev mode they work fine but in build it stops working randomly and if I refresh the page or move my mouse outside of the browser window it starts working again. I am not really sure how to debug this. I also found some similar issues on SO and Reddit but was unable to find the fix or reason for this issue. I have tried using the trailing slash and setting it to true, i was earlier using next-routes package for dynamic routing but switching from it didn't help either also tried using the Link Href and As attributes too but no luck, has anyone faced a similar issue.

https://stackoverflow.com/questions/71075761/next-js-links-do-not-work-after-exporting-static-html
https://www.reddit.com/r/nextjs/comments/o16ep3/strange_issue_in_production_build_links/

Next Version: ^12.2.0

0 Replies