question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fullcalendar SSR (server-side rendering)

See original GitHub issue

sandbox

FullCalendar 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.

My pull request

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:closed
  • Created 4 years ago
  • Reactions:9
  • Comments:26 (6 by maintainers)

github_iconTop GitHub Comments

4reactions
stupidguy176commented, Oct 20, 2020

I have run your project in https://github.com/fullcalendar/fullcalendar-example-projects/tree/master/nuxt and still got this error image

1reaction
vhlavsacommented, Apr 29, 2021

If you are still experiencing the “window is not defined” issue, try updating your Node version to at least v12.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found