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.

Solution for "Cannot read property 'isHiddenDay' of undefined"

See original GitHub issue

The JS error Cannot read property 'isHiddenDay' of undefined happens when there are multiple instances of the @fullcalendar/common package present in the same build. This is not the fault of the end-developer. After all, @fullcalendar/common is an internal-only package that nobody explicitly installs themselves.

How to solve this?: guarantee that all plugins are using the same @fullcalendar/common package by having @fullcalendar/core (the package the requires common) always be a peerDependency. It is already a peerDependency for all packages except the following:

  • @fullcalendar/react
  • @fullcalendar/angular
  • @fullcalendar/vue

Right now, things usually work because most bundlers know to dedup references to the same packages with similar semver strings. However, sometimes the semver strings are not exact. For example ^5.7.0 and ^5.7.1. This frequently happens when we release a patch-level release for only one package, not all. When this happens, bundlers act unpredictably with how they dedup. Using a peerDependency sidesteps this unpredictability.

This will be a breaking change for those three packages. That is why I will wait until v6 to implement this. For the remaining releases of v5, I will avoid the problem by making sure that all packages are always published upon any version bump.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:10
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
vuolencommented, Oct 21, 2022

So here’s how I seem to have fixed it with Next.js. I had the basic React example with react@5.11.2 and daygrid@5.11.3 packages installed. They seemed to import global css files, which didn’t sit well with Next. I found some fix involving next-transpile-modules. Running npm ls @fullcalendar/common indicated that there were no problems with deduping. Here’s what I did:

  1. Install @fullcalendar/react@beta and @fullcalendar/daygrid@beta
  2. Remove usage of the next-transpile-modules from my next.config.js

I’m quite unfamiliar with Next, so I have no idea why this works, but I won’t complain.

2reactions
TheophileMotcommented, Mar 20, 2022

@vhscom Thank you; I’ll have a look at that this week.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught TypeError: Cannot read property 'isHiddenDay' of ...
I've created a Svelte implementation of FullCalendar and I have issues upgrading to v5. I use rollup as my builder and a postcss...
Read more >
Fullcalendar - Cannot read property 'DayGrid' of undefined
I haven't found a solution, on any site. Please help! The full error message is: Uncaught TypeError: Cannot read property 'DayGrid' of ...
Read more >
[FullCalendar 2] [FullCalendar2] Error "Cannot read property ...
I'm receiving this error and calendar is not showing: "Cannot read property 'getUTCFullYear' of null". They already find a quick solution for reactive....
Read more >
fullCalendar - getting error on page load - MDBootstrap
Actual behavior When I add references to the plugin, I get fullcalendar.min.js:30 Uncaught TypeError: Cannot read property 'fn' of undefined at Object.
Read more >
Cannot read properties of undefined' - JavaScript Debugging
How To Fix 'Uncaught TypeError: Cannot read properties of undefined ' - JavaScript Debugging.
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