[HELP] Next-routes problem?
See original GitHub issueHello! I’m running latest next version with a typescript environment with a simple next-routes config, but I’m stucked with a problem.
What’s the problem?
I’m running the project, and when I access directly by url /dashboard/job/create/template/:id
, it works as expected without problem. If I access other page and use the Link component or Router api, my next app just says [HMR] bundle rebuilding
.
I have inserted a log in next router routeChangeStart
event and it starts to load the url /dashboard/job/create/template/:id
, but never ends in routeChangeComplete
or routeChangeError
event.
If I access directly from URL /dashboard/job/create/template/:id
, go for some component, and back to /dashboard/job/create/template/:id
using the Link component or Router api, it also work as expected…
Here’s my route config:
module.exports = routes.add(
'createTemplate',
'/dashboard/job/create/template/:id',
'dashboard/job/create/template/create'
)
Here’s my page folders:
- pages
- dashboard
- job
index
- create
- template
create
index
....
Anyone could help me?
Issue Analytics
- State:
- Created 5 years ago
- Comments:11
Top GitHub Comments
I’m actually running into this with Next.js v8.0.1 with the React-Slick package. If I import the css files into the top level page, routing via the
Link
component stops working for that page. Similar to @ntgussoni, I also have withCSS setup in my project, based on the Next.js example.For now, I’ve just been working around it by inserting the cdn link into a
<Head>
component.The sollution I found somewhere is to import an empty css in the _app file. Hope it helps