0

So i have this error:

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

Linda Lawton - DaImTo
  • 106,405
  • 32
  • 180
  • 449
Samir
  • 69
  • 10

1 Answers1

0

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

Anemoia
  • 7,928
  • 7
  • 46
  • 71