Flow Router SSR: There is no route for the path: /

Hi everyone,

I’m just wondering if anyone is getting / had the same issue as me with Flow Router SSR?

On all my routes I’m getting console errors saying there is no route for the path, eg:

There is no route for the path: /
There is no route for the path: /edit-profile

The app is going to the routes no problem though.

The code for both routes:

FlowRouter.route('/', {
  action(params) {
renderMainLayoutWith(<Home />);
  },
  name: 'Home'
});

FlowRouter.route('/edit-profile', {
  action(params) {
renderMainLayoutWith(<EditProfile />);
  }
});

Is there a reason this is happening? With SSR, should routes be defined on the server or in the lib directory?

Thanks,

Korus.

Is your routes file available on the server? (not in a client folder).

My router files are currently in the /lib folder. If I move them to the /server folder then everything breaks!

Thank you for the reply by the way, I didn’t receive an email notification of your reply for some reason so missed it :open_mouth:

Solved this. I had 2 versions of flow-router! Derp…

1 Like

I had the same thing. Remove one and it works again!