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.

[Bug]: SSR still doesn't work in Vue

See original GitHub issue

What package within Headless UI are you using?

@headlessui/vue

What version of that package are you using?

0.0.0-aa1a48c (dev)

What browser are you using?

Firefox

Reproduction repository

https://github.com/henribru/my-vitesse-app

Describe your issue

This is a follow-up to https://github.com/tailwindlabs/headlessui/issues/614 (making a separate issue because I know comments in closed issues have a tendency to get overlooked). The fix described in https://github.com/tailwindlabs/headlessui/issues/614#issuecomment-921760881 didn’t work, you still end up with a window is not defined error because watchEffect will run on the server. To reproduce it just run npm i and then npm run dev in the repository I’ve linked.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:4
  • Comments:5

github_iconTop GitHub Comments

2reactions
RobinMalfaitcommented, Oct 20, 2021

This should be fixed, and will be available in the next release.

You can already try it using:

  • npm install @headlessui/vue@dev or yarn add @headlessui/vue@dev.
0reactions
Christopher-Hayescommented, Oct 23, 2021

@dev is working for me, thanks @RobinMalfait!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Vue SSR issue with no ssr - Stack Overflow
vue') I'm getting document error on the server-side .I've try to wrap the root component on the home page with no-ssr but did...
Read more >
Server-Side Rendering (SSR) - Vue.js
Server-rendered markup doesn't need to wait until all JavaScript has been downloaded and executed to be displayed, so your user will see a...
Read more >
Creating Server-side Rendered Vue.js Apps Using Nuxt.js
There is a problem: We see the original state for a second while the API runs. Later, we will use a solution provided...
Read more >
What to do when Vue hydration fails - Alexander Lichter's blog
SSR is amazing but also comes with errors you might have not seen before. Especially one problem still boggles lots of minds: When...
Read more >
Understand and solve hydration errors in Vue.js - sum.cumo
The error can also only occur when using SSR and only if a URL is called ... This is generally not a problem...
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