-
-
Notifications
You must be signed in to change notification settings - Fork 197
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
Cannot read properties of undefined (reading 'Index') #338
Comments
same problem |
I got this problem as well. But I dont think it is an issue with vue-social-sharing. The nuxt support is for Nuxt 2 if I understand it correctly. In Nuxt 3 it is possible to simply register the Vue plugin directly: Create a new file in the plugins folder. See: https://nuxt.com/docs/guide/directory-structure/plugins#vue-plugins This will work:
If using SSR make sure to wrap it in a ClientOnly tag to avoid it getting rendered twice.
|
@muzicaed get new error on this way. Cannot set properties of undefined (setting '$SocialSharing') |
follow these steps: Install the specified version by running either of the following commands: Using Yarn: yarn add vue-social-sharing@next Version to install: Utilize it as a plugin in Nuxt, rather than a module. Create a new file in the "/plugins" directory named "vue-social-sharing.client.ts". Insert the following content into the file:
|
If you see it: Change vue-social-sharing.ts to this:
|
this is useful for me. |
Version using is "vue-social-sharing": "^4.0.0-alpha4"
"vue": "^3.2.47"
"nuxt": "^3.3.1"
The text was updated successfully, but these errors were encountered: