Closed jamespohalloran closed 4 years ago
Sounds like wrong usage of <Link>
: https://nextjs.org/docs/api-reference/next/link#dynamic-routes
Ahh! Sorry about that. Missed this section in the docs. Thanks!!
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
Bug report
Describe the bug
I am using
getStaticProps
andgetStaticPaths
to generate static pages. When accessing my pages generated from a dynamic URL, it is trying to prefetch .js files based off of their slugs (and 404'ing) e.g prefetch request: /pages/docs/concepts/getting-started/introduction.jsThe actual files in the build output static directory look like: /pages/docs/[...slug].js
To Reproduce
Create static pages using something like.
$ next export $ next out
The prefetching requests when navigating to these dynamic pages will 404
Expected behavior
Prefetching should either occur using the
/pages/docs/[...slug].js
url, or/pages/docs/[your_actual_page_slug].js
should be added to the build output.Screenshots
(blog, community, and teams are not dynamic pages, however the rest are).
Output from build
System information
Additional context
Add any other context about the problem here.