Skip to content

On static export, links fail but reload works #4384

@fgarcia

Description

@fgarcia

When I use the static export of my site, all links fail, but if I click reload the page loads.

The problem lies in the getInitialProps where I fetch information from an api endpoint of my server. In development mode it is running and everything works OK.

If I export a static version of my site, all links fail because the server on getInitialProps is not reachable. But if I click reload the page then works fine and renders the information that was fetched when the server api endpoint was available.

System information

  • OS: mac osx 10.13.4
  • Browser (if applies) chrome
  • Version of Next.js: [e.g. 6.0.2]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions