bootstrap.js:488 Uncaught TypeError: Cannot read properties of undefined (reading ‘cycle’)

I’m Creating a dynamic carousel Asp.net MVC
it’s not displaying the elements, but when I added “active” to the carousel-item class manually using inspect, it works perfectly. also, I’m getting this error

bootstrap.js:488 Uncaught TypeError: Cannot read properties of undefined (reading ‘cycle’) at HTMLDivElement. (bootstrap.js:488) at Function.each (jquery-3.4.1.js:367) at jQuery.fn.init.each (jquery-3.4.1.js:202) at jQuery.fn.init.Plugin (bootstrap.js:479) at HTMLDivElement. (bootstrap.js:542) at Function.each (jquery-3.4.1.js:367) at jQuery.fn.init.each (jquery-3.4.1.js:202) at bootstrap.js:540 at dispatch (jquery-3.4.1.js:5237) at elemData.handle (jquery-3.4.1.js:5044)

var list = Model;
var items = list.Take(3);
var iterations = 0;

while (items.Count() > 0)
{
var active = iterations == 0 ? “active” : “”;

foreach (var item in items)
{

Date

Price

@item.Description

}

iterations++;
items = list.Skip(3 * iterations).Take(3);

}