fullcalendar-“请在尝试导入插件之前导入顶级fullcalendar库" [英] fullcalendar - "Please import the top-level fullcalendar lib before attempting to import a plugin"
问题描述
所以我有这个错误:
未捕获的错误:请在尝试导入插件之前导入顶级全日历库.
Uncaught Error: Please import the top-level fullcalendar lib before attempting to import a plugin.
问题在于插件在导入主全日历之前已加载.但是我的进口货物订购正确.
The problem is that plugins are loaded before importing the main fullcalendar. But my imports are ordered correctly.
import {Calendar} from '@fullcalendar/core';
import dayGridPlugin from '@fullcalendar/daygrid';
import interactionPlugin from '@fullcalendar/interaction';
import googleCalendarPlugin from '@fullcalendar/google-calendar';
.
const calendar = new Calendar(calendarEl, {
plugins: [interactionPlugin, dayGridPlugin, googleCalendarPlugin],
我一直在网上寻找解决方案,并且所有人都表示进口订单不正确(询问问题代码的人也可以看到).但是我确定我的想法是正确的
I have looked online for a solution and all stated the same that the import orders are incorrect (that was also visible with the persons asking the questions code). But i am sure mine is correct
推荐答案
您的 @ fullcalendar/google-calendar
和 @ fullcalendar/core
不兼容.确保主要版本相同:
Your @fullcalendar/google-calendar
and @fullcalendar/core
are incompatible. Make sure that the major version is identical:
https://codesandbox.io/s/silly-euler-ginty?file =/package.json
这篇关于fullcalendar-“请在尝试导入插件之前导入顶级fullcalendar库"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!