next.js: 404 error when using useFileSystemPublicRoutes = false
When useFileSystemPublicRoutes is set to false and there is no custom route for path, but page-based route exists, nextjs will render that page on client instead of 404.
Steps to reproduce:
- Take
custom-serverexample - Replace
const app = next({ dev })inserver.jswithconst app = next({ dev, conf: { useFileSystemPublicRoutes: false } }) - There’s now no route for /
- Start the server, hit localhost:3000
- Server serves 404 (it flashes for a moment), then client takes over and re-renders
/pages/index.jscomponent. Browser console containsWarning: React attempted to reuse markup
So with this option behavior on server and client is not consistent, and it doesn’t look like it should work this way.
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Reactions: 12
- Comments: 24 (17 by maintainers)
also seeing the same problem, any updates on this issue? thanks