[Bug]: SSR still doesn't work in Vue
See original GitHub issueWhat package within Headless UI are you using?
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:
- Created 2 years ago
- Reactions:4
- Comments:5
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This should be fixed, and will be available in the next release.
You can already try it using:
npm install @headlessui/vue@dev
oryarn add @headlessui/vue@dev
.@dev is working for me, thanks @RobinMalfait!