Nuxt/prismic preview not working on production server


I'm using @nuxtjs/prismic: ^1.3.1. Preview are not working on production server, but locally it's working fine Getting 404 if page isn't published and no updates after saving and clicking the eyeicon after published.

I have followed the tutorial on modules website and checked that the Prismic Toolbar javascript file is included. Also updated the link-resolver.js and checked that /preview is generated when I'm running "npm run generate".

I hope someone here can help me here:)

Many thanks,

Hi @kristian,

I would need your repository name (you can share it in a private message if necessary).

It would also be helpful to give me access to your repository (my Prismic account is "") to try to reproduce the issue.

To dig deeper into this issue, we would need:

- `package.json` details (at least all (dev)dependencies);
- `nuxt.config.js` details (ideally all of it);
- A peek at one of your pages under the `~/pages` directory (at least the `asyncData` call);
- Some information about your deployment environment;
  (static like Netlify or dynamic with Nuxt universal & a server behind it)
- Browser used & versions;
- Anything you might think of that might tamper the cookies.

Thanks, we have got your private message.

Hi Kristian,

I'm taking over this thread from Fares.

  1. Can you try, in your nuxt config file, to remove :
mode: 'universal',

and add:

target: "static",
  1. Next remove '@/modules/static', and '@/modules/crawler', from your modules. These aren't needed with the latest versions of Nuxt.

  2. Remove the modern config from the Prismic object , it causes issues as described here.

  3. Then at the end of the file add this fallback:

  generate: {
    fallback: "404.html" // Netlify reads a 404.html, Nuxt will load as an SPA

Hopefully these changes should help.


Threads close after a period of inactivity. Flag this thread to re-open it and continue the conversation.