-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inherits Issue 982 from tailwindlabs/headlessui #13
Comments
Thank you for linking this! Helped me fix the issues I was having with the HeadlessDisclosure not loading correctly. |
Interesting, I thought this issue has been resolved in recent Nuxt versions and you no longer have to transpile the library. Which version of Nuxt are you using? Also, could it be that you have installed @headlessui/vue by yourself and it used a different version? If possible, please paste the output of |
For reference: |
Hey! Thanks for your reply, I thought this was fixed, too. I set up a fresh project with Nuxt 3.0.0 stable and only installed nuxt-headlessui as described in the documentation here: package.json looks like this:
Bug still occurs, but I hope this helps! Let me know, if you need more info Edit: (I use npm, so I can't give any info on yarn why, sry) |
## [1.0.2](v1.0.1...v1.0.2) (2022-11-18) ### Bug Fixes * **deps:** loosen semver range for @headlessui/vue, upgrade to nuxt stable ([607e02f](607e02f)) * **deps:** upgrade dependencies ([a312c69](a312c69)) * resolve path based on import.meta.url ([b281f36](b281f36)) * transpile @headlessui/vue ([4746f0a](4746f0a)), closes [#13](#13)
🎉 This issue has been resolved in version 1.0.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
I published a new version, which automatically adds |
Thank you so much, this works for now! I really hope there will be a better fix for this in the future, but that's not your job haha Thanks for maintaining this, I'll try to update this when I hear about an 'official' fix :) |
@Periton-Media I published a new version, which reverts the change of adding |
That last change appears to brought back this issue for me. I have to add |
I have removed the workaround of adding |
If you still have the issue, please create a reproduction so that I can take a look. I tested it in a fresh Nuxt 3 project, as well as in a personal more complex repo, and it worked with both dev and build. |
Thanks. I did update the lock file and am using the latest versions, but I still need the transpile option. This is the repo where I am having this problem: NuxTailwind. This is a template so it should isolate the issue but I will also try to create smaller repo for this. |
Thank you for the repo. I will have a look once I get some spare time. In the meantime, manually add @headlessui/vue to build.transpile as a workaround if you experience the issue. |
Hey @ymansurozer, where you able to isolate the issue into a smaller repo? |
Hey @P4sca1, I just tried with a smaller repo and it works without adding to build.transpile. I think is related to my other packages used in NuxTailwind. I'll delve into it and let you know if something related to the module comes up. |
Using the Menu component (for example) throws a bunch of errors:
Console errors:
[Vue warn]: provide() can only be used inside setup().
[Vue warn]: provide() can only be used inside setup().
[Vue warn]: inject() can only be used inside setup() or functional components.
[Vue warn]: Unhandled error during execution of setup function at
On-Screen Errors:
Cannot read properties of undefined (reading 'buttonRef')
Solution
tailwindlabs/headlessui#982
Adding
to nuxt.config.js resolves this.
It's just a minor inconvenience but still annoying. Don't know if this is something that can be fixed here or maybe there's another solution.
Thanks in advance!
The text was updated successfully, but these errors were encountered: