Skip to content
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

injection "Symbol(wormhole)" not found #400

Open
hackel opened this issue Sep 4, 2023 · 0 comments
Open

injection "Symbol(wormhole)" not found #400

hackel opened this issue Sep 4, 2023 · 0 comments

Comments

@hackel
Copy link

hackel commented Sep 4, 2023

I'm upgrading a vue2 app to vue3 and running into a problem with PortalVue. The app is creating a PortalTarget inside of a Bootstrap-Vue modal confirmation dialog (dynamically created):

            return this.$bvModal.msgBoxConfirm(
                this.$createElement('PortalTarget', {
                    props: {
                        name: this.$id('ConnectModal'),
                        slotProps: {
                            accounts: accountNames,
                            account: accountName,
                            single: isSingle,
                        },
                    },
                }),
                {
                    title: `Send Invite to ${isSingle ? accountName : 'Subscribers'}`,
                    cancelVariant: 'link',
                    okTitle: 'Assign Rates',
                    okVariant: 'success',
                },
            );

This gives me an error that "resolveComponent can only be used in setup() or render()," so I imported the PortalTarget component and used it directly, and that's when I get the error mentioned in the subject.

[Vue warn]: injection "Symbol(wormhole)" not found.
[portal-vue]: Necessary Injection not found. Make sur you installed the plugin properly.

I'm sure PortalVue is installed correctly. I've also tried using resolveComponent in the setup function and returning it from there, but I get the same error. This was all working fine with PortalVue 2.x. Is there any reason that creating the PortalTarget component dynamically like this would not work in PortalVue 3?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant