Hi Monisha,
Thanks for your answer, actually I did have the Duration field mapped in the taskFields object, but when reviewing said object, I saw that it had other additional fields that I was not using in the dataSource, I removed them and now everything works fine. Thank you very much for the observation.
export const taskFields = {
id: "TaskID",
name: "TaskName",
startDate: "StartDate",
endDate: "EndDate",
duration: "Duration",
progress: "Progress",
child: "subtasks",
dependency: "Predecessor",
resourceInfo: "Resources",
//durationUnit: "DurationUnit", //unused field
//segments: "Segments", //unused field
//work: "Work", //unused field
}