Vue Social Sharing

Viewed 24

I tried to implement Vue Social Sharing ( https://www.npmjs.com/package/vue-social-sharing ) into my Vue/TypeScript project. I implemented everything according instructions. I added to my main.ts file as below:

import { createApp } from "vue";
import App from "./App.vue";
import VueSocialSharing from "vue-social-sharing";

const app = createApp(App);
app.use(VueSocialSharing);

app.mount("#app");

Then I installed npm package and I added to my component.

<ShareNetwork
    network="facebook"
    url="https://news.vuejs.org/issues/180"
    title="Say hi to Vite! A brand new, extremely fast development setup for Vue."
    description="This week, I’d like to introduce you to 'Vite', which means 'Fast'. It’s a brand new development setup created by Evan You."
    quote="The hot reload is so fast it\'s near instant. - Evan You"
    hashtags="vuejs,vite"
  >
    Share on Facebook
</ShareNetwork>

Now console log displays a problem which I can't fix. Is any chance that someone can help me? Appreciate every help

Uncaught TypeError: Cannot set properties of undefined (setting '$SocialSharing')
    at Object.install (vue-social-sharing.js?d13f:1:1)
    at Object.use (runtime-core.esm-bundler.js?d2dd:4327:1)
    at eval (main.ts?5e60:33:1)
    at ./src/main.ts (app.js:518:1)
    at __webpack_require__ (app.js:1346:33)
    at app.js:2559:109
    at __webpack_require__.O (app.js:1400:23)
    at app.js:2560:53
    at app.js:2562:12
0 Answers
Related