I am trying to implement a carousel in a Nuxt application. This is my package.json
"dependencies": {
"@nuxtjs/i18n": "^7.0.3",
"core-js": "^3.15.1",
"flickity": "^2.2.2",
"lodash": "^4.17.21",
"nuxt": "^2.15.7",
"postcss-nesting": "^8.0.1",
"throttle-debounce": "^3.0.1",
"vue-flickity": "^1.2.1"
},
This is my code
<template>
<ClientOnly>
<Flickity
ref="flickity"
:key="keyIncrementer"
class="carousel"
:class="{ 'carousel--active': active }"
:options="computedOptions"
>
<slot />
</Flickity>
</ClientOnly>
</template>
<script>
import Flickity from 'vue-flickity'
const DEFAULT_OPTIONS = {
cellAlign: 'left',
pageDots: true,
prevNextButtons: true
}
export default {
components: {
Flickity,
},
name: 'BaseCarousel',
props: {
active: {
type: Boolean,
default: true
},
options: {
type: Object,
required: false,
default: () => ({})
}
},
If I don't comment out import Flickity from 'vue-flickity'
and
components: { Flickity, },
I get this error message.
I can't understand what is wrong here. If someone knows please help...