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

499 Views Asked by At

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!

1

There are 1 best solutions below

0
cantdocpp On BEST ANSWER

change the import statement to:

import VueCookies from 'vue-cookies'

by following the official docs