6eDesign / svelte-calendar

A lightweight datepicker with neat animations and a unique UX.
https://6edesign.github.io/svelte-calendar/
MIT License
537 stars 89 forks source link

Error when evaluating SSR module when running SvelteKit 1.0.0-next.168 dev server #126

Closed nstuyvesant closed 3 years ago

nstuyvesant commented 3 years ago

After explicitly adding dayjs to my devDependencies in my package.json per https://github.com/6eDesign/svelte-calendar/issues/125, I get:

1:47:35 PM [vite] Error when evaluating SSR module /node_modules/svelte-calendar/src/lib/components/Datepicker.svelte: Error: failed to load module for ssr: /src/lib/stores/datepicker at instantiateModule (/Users/nates/dev/my-app/node_modules/vite/dist/node/chunks/dep-63d4bd14.js:75058:15) 1:47:35 PM [vite] Error when evaluating SSR module /node_modules/svelte-calendar/index.js: Error: failed to load module for ssr: /src/lib/stores/datepicker at instantiateModule (/Users/nates/dev/my-app/node_modules/vite/dist/node/chunks/dep-63d4bd14.js:75058:15) 1:47:35 PM [vite] Error when evaluating SSR module /src/routes/index.svelte: Error: failed to load module for ssr: /src/lib/stores/datepicker at instantiateModule (/Users/nates/dev/my-app/node_modules/vite/dist/node/chunks/dep-63d4bd14.js:75058:15) failed to load module for ssr: /src/lib/stores/datepicker Error: failed to load module for ssr: /src/lib/stores/datepicker at instantiateModule (/Users/nates/dev/my-app/node_modules/vite/dist/node/chunks/dep-63d4bd14.js:75058:15)

when doing an npm run dev -- --open with a fresh SvelteKit project that imports Datepicker and uses the component on /src/routes/index.svelte.

nstuyvesant commented 3 years ago

Reverting back to svelte-calendar@2.0.4 is my temporary workaround.

jzillmann commented 3 years ago

Same problem here with Svelte kit. Didn't include dayjs. Using svelte-calendar@2.0.4 works. Also having errors in VSCode (my project is a typescript one)

Wonderful calendar by the way!

6eDesign commented 3 years ago

Packaging configuration updates have been applied and sveltekit-specific instructions have been added to the README. Please re-open/comment if you are continuing to have issues after updating svelte-calendar and updating your svelte.config.js.