Fullcalendar SSR (server-side rendering)
See original GitHub issueFullCalendar displays “Element is not defined” error. I’ve tried to install it as a plugin and set nuxt SSR to false, the problem persists. The only fix without changing the code (that I found) is setting nuxt to --spa mode.
Found this issue at fullcalendar-react and that fixed the problem.
EDIT:
Found a workaround.
Instead of this:
plugins/full-calendar.js
import Vue from 'vue'
import FullCalendar from "@fullcalendar/vue"
Vue.use(FullCalendar)
Do this:
plugins/full-calendar.js
import Vue from 'vue'
import Calendar from '~/components/calendar'
Vue.component('calendar', Calendar)
and in nuxt.config.js
plugins: [
{src: '~/plugins/full-calendar.js', ssr: false}
]
Issue Analytics
- State:
- Created 4 years ago
- Reactions:9
- Comments:26 (6 by maintainers)
Top Results From Across the Web
events (as a json feed) - Docs - FullCalendar
A URL of a JSON feed that the calendar will fetch Event Objects from. FullCalendar will visit the URL whenever it needs new...
Read more >FullCalendar fetching events from server not working
1 Answer 1 ... Your response is not conform to fullCalendar expected output. If you see the doc, you understand that each events...
Read more >How to use FullCalendar in Next.js - David Angulo
Next.js renders the page on the server side. Since it was on the server side, window is not available as it is only...
Read more >FullCalendar Example with Client-Side Event Updates
I've been mucking around with FullCalendar recently and decided to share one of the prototypes I've ended up with. It basically lets the...
Read more >Using FullCalendar.js in C# ASP.NET Core web applications
The M-V-C files are available at:https://github.com/gorgorgordon/Using- JavaScript -Library-in-.NET-Core-Web-Apps.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have run your project in https://github.com/fullcalendar/fullcalendar-example-projects/tree/master/nuxt and still got this error
If you are still experiencing the “window is not defined” issue, try updating your Node version to at least v12.