If we use new dynamic routing with filenames like this pages/profile/[pid].js. Pre-fetching is trying to fetch _next/static/kACFkwO5w4BLysElZwMn1/pages/profile/actual-name.js because the link href looks like this.
You can simply visit this link and see the network tab to understand it easily https://undefined-ja3gehzjx.now.sh/profilelist
The pre-fetch should happen on the actual filename which is [pid].js
Not necessary.
https://github.com/zeit/next.js#routing
Under Dynamic Routes:
component has two relevant props when using Dynamic Routes:
href: the path inside pages directory
as: the path that will be rendered in the browser URL bar
You need to set both. I assume you currently added only href.
Most helpful comment
https://github.com/zeit/next.js#routing
Under
Dynamic Routes:component has two relevant props when using Dynamic Routes:
href: the path inside pages directoryas: the path that will be rendered in the browser URL barYou need to set both. I assume you currently added only
href.