fides icon indicating copy to clipboard operation
fides copied to clipboard

Cannot navigate directly to a frontend path when serving static files via python server

Open allisonking opened this issue 3 years ago • 0 comments

Bug Description

Right now we can go to localhost:8080 and navigate to localhost:8080/dataset via the navbar. However, browsing directly to localhost:8080/dataset does not work.

Steps to Reproduce

  1. nox -s dev
  2. In clients/admin-ui run npm run prod-export
  3. Navigate directly to localhost:8080/dataset and check out the error

Expected behavior

Navigating directly to a path should give the same result as if we were to navigate to it through next's routing

Additional context

This should be a nextjs configuration issue. The same thing happens if you try to serve the exported files out via a simple server i.e. python -m http.server. Some potential resources/solutions:

  • https://github.com/vercel/next.js/discussions/10522
  • https://stackoverflow.com/questions/67034554/nextjs-url-not-working-after-getting-exported
  • https://nextjs.org/docs/api-reference/next.config.js/exportPathMap

allisonking avatar Jul 26 '22 16:07 allisonking