Closed ghost closed 7 years ago
Actually...it may be that next-routes is not handling the routes. It looks like none of the next-routes route handling code is running. That might be my bad. Trying to figure it out.
Sounds like the routes handler was not properly included on the server side. Please post the relevant server part if it's not resolved yet.
Had this issue as well. I felt a bit silly, it was because I was still trying to use npm run dev
(which just executesnext
), instead of running node server.js
.
@fridays That's exactly what the issue was. Sorry to have bugged you. @confuser I felt the same way after discovering it. Though, to be fair, in many ways it looked like everything else was working...or partially working so I didn't even consider this possibility. All good now though. Thanks guys! Works great in fact!
@ccuilla @confuser I just ran into this but I don't understand why I can't use npm run dev
. I think it'd be helpful to know why it doesn't work. Can you enlighten me? Thanks!
@captainill Basically it's because you are overriding the server (from next.js) and creating your own. So you need to run that server instead by doing something like node server.js
.
If I have a route like:
/foo
or
/foo/bar
And I try to type that directly into the URL field of a browser rather than clicking a link generated in the website, I get a 404.