Coder Social home page Coder Social logo

Comments (11)

HochinChan avatar HochinChan commented on June 9, 2024 3

+1

from vue-social-sharing.

kyng-cytro avatar kyng-cytro commented on June 9, 2024 3

I ran into this issue—I fixed mine by creating a custom plugin.

To do this, create a new file in the /plugins directory. "plugins/vue-social-sharing.client.ts" it's content should loop like this:

import VueSocialSharing from "vue-social-sharing";

export default defineNuxtPlugin((nuxtApp) => {
  nuxtApp.vueApp.use(VueSocialSharing);
});

Hope this helps.

from vue-social-sharing.

oawebdev avatar oawebdev commented on June 9, 2024 1

image
Nuxt 3.0.0-rc.11
#315

from vue-social-sharing.

kyng-cytro avatar kyng-cytro commented on June 9, 2024 1

Awesome that should fix for everyone now.

from vue-social-sharing.

phailee avatar phailee commented on June 9, 2024

err

I am getting this error after using above solution

from vue-social-sharing.

sanyaches avatar sanyaches commented on June 9, 2024

Nuxt 3.0.0, it's still an issue

from vue-social-sharing.

kyng-cytro avatar kyng-cytro commented on June 9, 2024

Here is a link to the project where I got it working.
Link hope this helps.

from vue-social-sharing.

sanyaches avatar sanyaches commented on June 9, 2024

@kyng-cytro Thanks for sharing that, I noticed that it's working because of the version of vue-social-sharing package

So, the working recipe:

  1. Install the version below, run yarn add vue-social-sharing@next or npm install --save vue-social-sharing@next:
    "vue-social-sharing": "^4.0.0-alpha4" - Works, for Vue 3
    "vue-social-sharing": "3.0.9" - Does not, for Vue 2

  2. Use it like a plugin in Nuxt, not a module

I ran into this issue—I fixed mine by creating a custom plugin.

To do this, create a new file in the /plugins directory. "plugins/vue-social-sharing.client.ts" it's content should loop like this:

import VueSocialSharing from "vue-social-sharing";

export default defineNuxtPlugin((nuxtApp) => {
  nuxtApp.vueApp.use(VueSocialSharing);
});

Hope this helps.

UPD: Of course, Nuxt 3.0.0 is meant

from vue-social-sharing.

sanyaches avatar sanyaches commented on June 9, 2024

@bonomite Could you recheck that, please?

from vue-social-sharing.

bonomite avatar bonomite commented on June 9, 2024

I started a new Nuxt3 project, installing the @next version, and after making a plug-in like instructed above, I did get a error that said "it could not resolve <ShareNetwork>", I just wrapped it in a <ClientOnly> tag, and it worked.
image

is the button supposed to be styled?

stackblitz: https://stackblitz.com/edit/nuxt-starter-nslbhm?file=package.json,app.vue&file=nuxt.config.ts,plugins%2Fvue-social-sharing.client.ts

from vue-social-sharing.

stale avatar stale commented on June 9, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

from vue-social-sharing.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.