question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hydration issue with Netlify deployments

See original GitHub issue

Environment

Nuxt CLI v3.0.0-rc.5 15:54:14 RootDir: /home/sfrede/Sites/SabineHugo/Website 15:54:15 Nuxt project info: 15:54:15


  • Operating System: Linux
  • Node Version: v16.16.0
  • Nuxt Version: 3.0.0-rc.5
  • Package Manager: npm@8.15.1
  • Builder: vite
  • User Config: css, modules, typescript, app, content
  • Runtime Modules: @nuxt/content@2.1.0-27630041.9582f8c, @vueuse/nuxt@8.9.3
  • Build Modules: -

Reproduction

A regular deploy on Netlify.

Describe the bug

I realized at some point that my deploy previews on Netlify were slightly off.

For example my footer component was doubled and my slider component stopped working as expected.

At first this just affected the deploy previews but since of today this is also affecting production which renders us unable to deploy anything.

Needless to say that locally everything is working fine.

This is the repository: https://github.com/sabinehugo189/sabinehugo

Because I’m not sure if this is a problem with Nuxt3 or with Netlify I also posted the problem on the Netlify forum: https://answers.netlify.com/t/differences-between-deploy-previews-and-live-with-nuxt-3/71603/3.

Additional context

No response

Logs

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

6reactions
pi0commented, Aug 1, 2022

After long debugging with @danielroe, we could narrow it down to a recent change in RC.5. (context: #5506)

We are still investigating but as a quick workaround, please try this in nuxt.config:

import { defineNuxtConfig } from 'nuxt'

export default defineNuxtConfig({
  hooks: {
    'vite:extendConfig'(config, { isServer }) {
      if (isServer) {
        // Workaround for netlify issue
        // https://github.com/nuxt/framework/issues/6204
        config.build.rollupOptions.output.inlineDynamicImports = true
      }
    }
  },
})
2reactions
stefanfredecommented, Aug 1, 2022

I can confirm that the workaround is working.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix Next.js “Text content does not match server-rendered ...
Learn how to fix the React hydration error “Text content does not match server-rendered HTML” so you can personalize & transform HTML in ......
Read more >
How to build speedy sites with Vite + partial hydration - Netlify
If you haven't heard the term “hydration” before, here's a step-by-step of the hydration process: ⚙️ Pre-render your components to static HTML ......
Read more >
SSR with netlify functions not hydrating - Support
I'm trying to do super basic server-side rendering with netlify functions; however, it seems like the app isn't being hydrated correctly. I have ......
Read more >
Hydrogen on Netlify
Deploy your Hydrogen app to our edge network by using Edge Functions. ... Server Components and SSR with suspense, you can progressively hydrate...
Read more >
Astro on Netlify
Key features. These features provide important benefits for Astro projects, including those built by and deployed with Netlify. Partial hydration. Astro is ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found