The problem is that you are exporting router
as named export router
, but trying to import it as indexRoute
.
You should either rename your export:
export { router as indexRoute }
or change your import:
import { router as indexRoute } from './routes/index_route';