-
Notifications
You must be signed in to change notification settings - Fork 100
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
help: Using onGlobalSetup from custom nuxt module #406
Comments
@danielroe Simple reproduction repository here: https://github.com/lewebsimple/nuxt-onglobalsetup-repro |
@lewebsimple The issue here is that your module's injected plugin is running before the composition API has been initialised. A workaround (before I resolve the core issue) is to move your module to |
@danielroe many people have said this before, you are a genius! |
Should also now be resolved in |
Getting the following:
|
@lewebsimple Check what Node version you are using. |
@lewebsimple (Should be fixed in any case with v0.22.4.) |
📚 What are you trying to do? Please describe.
I'm currently developing a Nuxt module for the Villus GraphQL client and when trying to add support for @nuxtjs/composition-api I run into the following error (the call stack indicates this is coming from onGlobalSetup):
🔍 What have you tried?
I tried mashing my keyboard with a wooden spoon to make it work but it didn't work :|
ℹ️ Additional context
The plugin provided by the Nuxt module is transpiled from TypeScript.
@nuxtjs/composition-api
is listed both in peerDependencies and devDependencies on the module side of things.I'm testing the module inside a local project using
yarn link nuxt-villus
but I also tried releasing the module and using it as a normal dependency to no avail.The text was updated successfully, but these errors were encountered: