The JS error Please import the top-level fullcalendar lib before attempting to import a plugin will appear if an import statement for a FullCalendar plugin (like @fullcalendar/timeline) goes before the @fullcalendar/react import. That's why the FullCalendar React docs tell you to order your import statements in a certain way:
import React from 'react'
import FullCalendar from '@fullcalendar/react' // must go before plugins
import dayGridPlugin from '@fullcalendar/daygrid' // a plugin!
This ordering restriction is necessary for internal reasons. The goal is to do away with this restriction. Please see the following ticket on the core project's issue tracker to learn more: https://github.com/fullcalendar/fullcalendar/issues/6371
The JS error
Please import the top-level fullcalendar lib before attempting to import a plugin
will appear if an import statement for a FullCalendar plugin (like@fullcalendar/timeline
) goes before the@fullcalendar/react
import. That's why the FullCalendar React docs tell you to order your import statements in a certain way:This ordering restriction is necessary for internal reasons. The goal is to do away with this restriction. Please see the following ticket on the core project's issue tracker to learn more: https://github.com/fullcalendar/fullcalendar/issues/6371