Search code examples
vuejs3vue-cookies

Problem in use of vue-cookies in vue.js 3


I have a problem, and it's that I'm trying to use Vue cookies, but I'm encountering this issue:

I have installed it using: npm install vue-cookies

in main.ts (TypeScript)

import { VueCookies } from 'vue-cookies';

const app = createApp(App);

app.use(router).use(VueCookies, {expires: '1d'}).mount('#app');

but show this error.

enter image description here

enter image description here this problem is showed!


Solution

  • change the import statement to:

    import VueCookies from 'vue-cookies'
    

    by following the official docs