Closed vanling closed 2 years ago
I tried to add headless ui and use their components Menu, MenuButton and MenuItems but I have a error "500 window is not defined".
Is this library not working at all with nuxt 3 (yet)?
I tried to add headless ui and use their components Menu, MenuButton and MenuItems but I have a error "500 window is not defined".
Is this library not working at all with nuxt 3 (yet)?
@eMeRiKa13 I added the link above, we are waiting for the update. headlessui
@eMeRiKa13 it only works in SPA mode without any Server side rendering :( headless-ui uses window and document object. 🤞 hope they fix it, would be a holy grail for me.
Thanks for your answer @productdevbook and @vanling!
I hope too
fixed, change modal ref true -> false :) and allupdate check repo
Environment
Nuxt CLI v3.0.0-27258467.4e424d0
Darwin
v16.13.0
3.0.0-27258467.4e424d0
yarn@1.22.17
Vite
buildModules
,build
-
Build Modules:
@pinia/nuxt@0.1.0
Describe the bug
SSR is not working because of headless-ui.
If you can go to the modal page from index.vue it works if you go to http://localhost:3000/modal directly or refresh there it breaks.
Not your fault, just headless-ui being naughty with using the window object
Additional context
No response
Logs