Cannot read property '$swiper' of undefined
See original GitHub issuecode:
import { Swiper, SwiperSlide, directive } from 'vue-awesome-swiper'
import 'swiper/css/swiper.css'
<swiper ref="mySwiper">
......
</swiper>
computed: {
swiper () {
return this.$refs.mySwiper.$swiper
}
},
activated () {
this.swiper.slideNext(1000)
}
error:
vue.esm.js?65d7:628 [Vue warn]: Error in activated hook: “TypeError: Cannot read property ‘$swiper’ of undefined”
According to the official instructions configuration, do not know why can not find
Issue Analytics
- State:
- Created 3 years ago
- Comments:9
Top Results From Across the Web
swiper instance: Cannot read properties of undefined ... - GitHub
When using event listeners on swiper instance error TypeError: Cannot read properties of undefined (reading 'event_name') occur where event_name is the name ...
Read more >Cannot set property 'Swiper' of undefined - Stack Overflow
You just need to look onto your gulpfile.js under plugin.babel and look at the ignore section and just add swiper.js to the array....
Read more >Can't access swiper js instance of a glider - WordPress.org
I have been using the following code to manipulate settings of swiper that are not ... Uncaught TypeError: Cannot read properties of undefined...
Read more >nolimits4web/Swiper - Gitter
Uncaught TypeError : Cannot read property 'offsetWidth' of undefined .scrollbar.set @ swiper.js:2555 .onResize @ swiper.js:999.
Read more >All Swiper.js Instances in Elementor are Now Exposed
Elementor uses Swiper, an external JS library, to power all of the sliders and carousels in ... the code fires “cannot read property...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Getting the same error in 4.1.1. Have tried .swiper and .$swiper with no luck
beacuse of different version, when i use v3.1.3, it’s swiper, when i use v4.1.1, it’s $swiper