TypeError: context is undefined is undefined, в чем может быть причина?

У меня проблема с интеграцией временной шкалы fullCalendar.

TypeError: контекст не определен

_renderSkeleton http://localhost:8080/scripts/fullcalendar/v4/resource-timeline/main.js?_=1f5faae92d540252c76d4f50aa1163c73ac8937a_20200625092942:596
res http://localhost:8080/scripts/fullcalendar/v4/core/main.js?_=1f5faae92d540252c76d4f50aa1163c73ac8937a_20200625092942:3189
render http://localhost:8080/scripts/fullcalendar/v4/resource-timeline/main.js?_=1f5faae92d540252c76d4f50aa1163c73ac8937a_20200625092942:574
receiveProps http://localhost:8080/scripts/fullcalendar/v4/core/main.js?_=1f5faae92d540252c76d4f50aa1163c73ac8937a_20200625092942:3887
renderView http://localhost:8080/scripts/fullcalendar/v4/core/main.js?_=1f5faae92d540252c76d4f50aa1163c73ac8937a_20200625092942:6277
render http://localhost:8080/scripts/fullcalendar/v4/core/main.js?_=1f5faae92d540252c76d4f50aa1163c73ac8937a_20200625092942:6202
receiveProps http://localhost:8080/scripts/fullcalendar/v4/core/main.js?_=1f5faae92d540252c76d4f50aa1163c73ac8937a_20200625092942:3887
renderComponent http://localhost:8080/scripts/fullcalendar/v4/core/main.js?_=1f5faae92d540252c76d4f50aa1163c73ac8937a_20200625092942:6817
executeRender http://localhost:8080/scripts/fullcalendar/v4/core/main.js?_=1f5faae92d540252c76d4f50aa1163c73ac8937a_20200625092942:6774
render http://localhost:8080/scripts/fullcalendar/v4/core/main.js?_=1f5faae92d540252c76d4f50aa1163c73ac8937a_20200625092942:6596
calendar http://localhost:8080/resource?row_id=267&_=1f5faae92d540252c76d4f50aa1163c73ac8937a_20200625092942:1
loadCalendar http://localhost:8080/scripts/ui/ui-bundle.js?_=1f5faae92d540252c76d4f50aa1163c73ac8937a:1176
render http://localhost:8080/resource?row_id=267&_=1f5faae92d540252c76d4f50aa1163c73ac8937a_20200625092942:2
<anonymous> http://localhost:8080/scripts/ui/ui-bundle.js?_=1f5faae92d540252c76d4f50aa1163c73ac8937a line 641 > eval:1
<anonymous> http://localhost:8080/scripts/ui/ui-bundle.js?_=1f5faae92d540252c76d4f50aa1163c73ac8937a line 641 > eval:1
exec http://localhost:8080/scripts/ui/ui-bundle.js?_=1f5faae92d540252c76d4f50aa1163c73ac8937a:641
external http://localhost:8080/scripts/ui/ui-bundle.js?_=1f5faae92d540252c76d4f50aa1163c73ac8937a:635
display http://localhost:8080/scripts/ui/ui-bundle.js?_=1f5faae92d540252c76d4f50aa1163c73ac8937a:2544
external http://localhost:8080/scripts/ui/ui-bundle.js?_=1f5faae92d540252c76d4f50aa1163c73ac8937a:635
disp http://localhost:8080/scripts/ui/ui-bundle.js?_=1f5faae92d540252c76d4f50aa1163c73ac8937a:634
ok http://localhost:8080/scripts/ui/ui-bundle.js?_=1f5faae92d540252c76d4f50aa1163c73ac8937a:1096
canCloseContent http://localhost:8080/scripts/ui/ui-bundle.js?_=1f5faae92d540252c76d4f50aa1163c73ac8937a:1097
disp http://localhost:8080/scripts/ui/ui-bundle.js?_=1f5faae92d540252c76d4f50aa1163c73ac8937a:634
external http://localhost:8080/scripts/ui/ui-bundle.js?_=1f5faae92d540252c76d4f50aa1163c73ac8937a:635
load http://localhost:8080/scripts/ui/ui-bundle.js?_=1f5faae92d540252c76d4f50aa1163c73ac8937a:538
onload http://localhost:8080/scripts/ui/ui-bundle.js?_=1f5faae92d540252c76d4f50aa1163c73ac8937a:537
onload http://localhost:8080/scripts/ui/ui-bundle.js?_=1f5faae92d540252c76d4f50aa1163c73ac8937a:536
loadScript http://localhost:8080/scripts/ui/ui-bundle.js?_=1f5faae92d540252c76d4f50aa1163c73ac8937a:522

Кажется, что весь плагин JS / CSS отлично загружен: ядро, дневная сетка, взаимодействие, список, общие ресурсы, временная шкала ресурсов, временная шкала, временная сетка.

Вот мой код javascript.

var AppTestTimeline = AppTestTimeline || (function ($) {
    
    function calendar() {
        new FullCalendar.Calendar($("#testtimeline")[0], {
            plugins: [ 'interaction', 'resourceTimeline' ],
            defaultView: 'resourceTimelineDay',
            aspectRatio: 1.5,
            header: { left: 'prev,next', center: 'title', right: 'resourceTimelineDay,resourceTimelineWeek,resourceTimelineMonth' },
            editable: false,
            resourceLabelText: 'Rooms',
            resources: 'https://fullcalendar.io/demo-resources.json?with-nesting&with-colors',
            events: 'https://fullcalendar.io/demo-events.json?single-day&for-resource-timeline'
        }).render();
    }

    return { render: function(params) {
        $ui.loadCalendar(calendar);
    }};

})(jQuery);

В чем может быть причина и где искать улики?

Спасибо.


person jmc    schedule 25.06.2020    source источник


Ответы (1)


Хорошо, проблема заключалась в том, что версия основной библиотеки несовместима с библиотекой временной шкалы, которая у меня была.

person jmc    schedule 25.06.2020