Full-Calendar не работает, fullCalender - неопределенная ошибка - PullRequest
0 голосов
/ 20 декабря 2018

Я недавно попал в nextjs и хочу использовать Full-calendar для реакции, и он не работает, он продолжает говорить, что fullCalendar не определен.Я думаю, что причина в том, что он отображается с сервера, а jquery не распознается, есть ли способ сделать это?

    Cannot set property 'fullCalendar' of undefined
TypeError: Cannot set property 'fullCalendar' of undefined
    at Object.<anonymous> (C:\Users\jarka\OneDrive\Desktop\hr-website\hr-next-graphql\next\node_modules\fullcalendar-reactwrapper\lib\index.js:26051:19)
    at $.fullCalendar.version (C:\Users\jarka\OneDrive\Desktop\hr-website\hr-next-graphql\next\node_modules\fullcalendar-reactwrapper\lib\index.js:26028:37)
    at Object.map../af (C:\Users\jarka\OneDrive\Desktop\hr-website\hr-next-graphql\next\node_modules\fullcalendar-reactwrapper\lib\index.js:26037:3)
    at __webpack_require__ (C:\Users\jarka\OneDrive\Desktop\hr-website\hr-next-graphql\next\node_modules\fullcalendar-reactwrapper\lib\index.js:30:30)
    at Object.defineProperty.value (C:\Users\jarka\OneDrive\Desktop\hr-website\hr-next-graphql\next\node_modules\fullcalendar-reactwrapper\lib\index.js:25910:21)
    at __webpack_require__ (C:\Users\jarka\OneDrive\Desktop\hr-website\hr-next-graphql\next\node_modules\fullcalendar-reactwrapper\lib\index.js:30:30)
    at Object.<anonymous> (C:\Users\jarka\OneDrive\Desktop\hr-website\hr-next-graphql\next\node_modules\fullcalendar-reactwrapper\lib\index.js:41903:18)
    at __webpack_require__ (C:\Users\jarka\OneDrive\Desktop\hr-website\hr-next-graphql\next\node_modules\fullcalendar-reactwrapper\lib\index.js:30:30)
    at C:\Users\jarka\OneDrive\Desktop\hr-website\hr-next-graphql\next\node_modules\fullcalendar-reactwrapper\lib\index.js:76:18
    at C:\Users\jarka\OneDrive\Desktop\hr-website\hr-next-graphql\next\node_modules\fullcalendar-reactwrapper\lib\index.js:79:10
    at webpackUniversalModuleDefinition (C:\Users\jarka\OneDrive\Desktop\hr-website\hr-next-graphql\next\node_modules\fullcalendar-reactwrapper\lib\index.js:3:20)
    at Object.<anonymous> (C:\Users\jarka\OneDrive\Desktop\hr-website\hr-next-graphql\next\node_modules\fullcalendar-reactwrapper\lib\index.js:10:3)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)

1 Ответ

0 голосов
/ 27 апреля 2019

Возможно, вы захотите перейти на FullCalendar V4, поскольку он не зависит от jQuery, что упрощает его интеграцию с React.Он также имеет официальный компонент FullCalendar React , который был недавно выпущен.

Тогда для документации по компоненту FullCalendar React вы можете сослаться здесь .

Для интеграции FullCalendar с Next.js я написал статью о , как использовать FullCalendar в Next.js .Возможно, вы захотите прочитать об этом.

Надеюсь, это поможет.

...