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 is broken with SvelteKit

See original GitHub issue

@YogliB

FullCalendar doesn’t work in SvelteKit projects; it gives the following error in the console:

svelte-fullcalendar doesn't appear to be written in CJS, but also doesn't appear to be a valid ES module (i.e. it doesn't have "type": "module" or an .mjs extension for the entry point). Please contact the package author to fix.

10:15:31 p.m. [vite] Error when evaluating SSR module /node_modules/preact/compat/dist/compat.module.js?v=39414b8c:
ReferenceError: __vite_ssr_import_1__ is not defined
    at eval (/node_modules/preact/compat/dist/compat.module.js?v=39414b8c:11:712)
    at async instantiateModule (.../svelte-fullcalendar/examples/kit/node_modules/vite/dist/node/chunks/dep-5496817b.js:67449:9)

To reproduce, try running the demo in /examples/kit. I tried changing the SSR settings, both globally (in svelte.config.js) as well as locally (in the index.svelte file that loads the calendar) but didn’t have any luck.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:37 (21 by maintainers)

github_iconTop GitHub Comments

4reactions
goynangcommented, Jan 18, 2022

I’ve found that…

import '@fullcalendar/core/vdom'

…helped me as per https://github.com/fullcalendar/fullcalendar-vue/issues/152 and Vue example on https://fullcalendar.io/docs/vue

2reactions
devShamimcommented, Dec 13, 2022

Just import @fullcalendar/core/vdom before you import svelte-fullcalendar and other fullcalendar plugins. Like this: import '@fullcalendar/core/vdom'; import FullCalendar from 'svelte-fullcalendar'; import daygridPlugin from '@fullcalendar/daygrid';

I am using this version (^2.0.0-beta.0) of svelte-fullcalendar along with vite-4.0.1

Read more comments on GitHub >

github_iconTop Results From Across the Web

Sveltekit FullCalendar : r/sveltejs - Reddit
If some of you still have some issues using FullCalendar with sveltekit here is a repo with the integration, it has tailwindcss as...
Read more >
I have a problem with the Chart Js library with svelte when ...
Unable to access request.body from the endpoint.js in sveltekit skeleton project · 1 · FullCalendar Dynamic Import.
Read more >
JavaScript packages index - Page 3112 | Snyk Advisor - Snyk
... svelte-froalacharts · svelte-fsm · svelte-fullcalendar · svelte-fullpage ... svelte-kit-adapter-cloudflare-workers-auth0 · sveltekit-adapter-dotnetcore ...
Read more >
svelte-fullcalendar - npm
svelte-fullcalendar. TypeScript icon, indicating that this package has built-in type declarations · Keywords.
Read more >
xucunostlipapaloapan on Twitter: "Wij zijn blij Vanaf vandaag ...
for creating such a amazing framework #svelte #sveltekit #webdevelopment ... Angular 12 FullCalendar Create and Display Dynamic Events #angular ...
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