Getting Cannot read property ‘offsetWidth’ of undefined with bootstrap carousel script June 9, 2023 by Tarik For me it was because I hadn’t set an active class on any of the slides.