Full static Nuxt build - routing not working when deployed

I’ve been deploying a Nuxt version 2 build in the past couple of weeks but I recently stumbled into a configuration problem.

When using the following flags within the nuxt.config.js:

ssr: false,
target: static

The app dist folder gets generated with files relying entirely from JS logic to fetch data within the client side, and after the deployment the app works perfectly fine except that if the user doesn’t have javascript enabled on his client the app doesn’t work at all (furthermore, it’s not a good experience for SEO reasons)

When using the following flags:

ssr: true,
target: static

The app dist folder gets generated with all the content available within the html source (good!) but when deployed the routing is f**ked up, the navigation between pages doesn’t work but the URLs do update.

I tried changing <nuxt-link> tags with <router-link> but the output is exactly the same.

Note: when starting a local server with the above dist everything works like a charm so it must be some shenaningan from Netlify configuration


  command = "npm run generate"
  publish = "dist/"

Unfortunately, I can’t provide the URL at this stage.

There’s not a lot we can do without the URL (or any other identifier - site ID, deploy ID, etc.)

The configuration seems, okay, nothing obviously wrong stands out.

Given the post is public would it be possible to share this information just to Netlify staff, perhaps via email?

You can drop me a PM.

Hi @pigroz,

From what we can check, this doesn’t appear to be a Netlify issue. When I disabled JavaScript and tried to load the links, it works fine - the problem occurs when JavaScript is enabled. This would mean that something is going wrong with the custom code and we cannot debug that.

Thanks for your reply,

Apologies for not coming back so quickly, thanks for checking it out.
At this point It seems like a lack of documentation from the Storyblok service (the headless system which runs on top of Nuxt.js) therefore I would follow up with them.