0
votes

I am building a simple site using Nuxt, and Prismic.

All the content pulls fine and works perfect on my local machine using npm run dev. The issue occurs when I've generated the files; it seems to 404 on every second link. But, if I refresh its fine.

See this video: https://vimeo.com/381189229

Description of the video:

  1. Land on the homepage
  2. Click 'Why?' Page loads fine
  3. Click 'What?' Page 404's
  4. Refresh page loads fine.
  5. Click 'Services' Page loads fine.
  6. Click Blog, page 404s
  7. Refresh page loads fine.
  8. Rinse and repeat

I am generating the dynamic routes by querying the prismic API for pages and blog posts, then passing them into the nuxt generate command.

Here is the output from the generate command: output of nuxt generate

So it clearly is generating the pages and I can see the pages in the /dist folder.

Another pointer is that the site works fine when I disable JS.

I would link to the site, but it's under htauth.

Does anyone have any ideas? Thanks.

1

1 Answers

0
votes

Can you provide us an access to your code? (Github or anything else) It will be easier to help you out.