beyonk-group / svelte-datepicker

A lightweight datepicker written in Svelte
MIT License
143 stars 23 forks source link

Cannot read properties of undefined (reading 'extend') #56

Open xpluscal opened 2 years ago

xpluscal commented 2 years ago

I've updated the vite config to contain the ssr/noexternal/dayjs but I am errors on all files with the "extend" issue, see excertp below:

...
3:40:13 PM [vite] Error when evaluating SSR module /node_modules/@beyonk/svelte-datepicker/src/components/lib/context.js:
TypeError: Cannot read properties of undefined (reading 'extend')
    at /node_modules/@beyonk/svelte-datepicker/src/components/lib/date-utils.js:7:7
isaac-mcfadyen commented 2 years ago

This issue is also occurring for me, same error. Also configured via svelte.config.js but still errors.

Pierstoval commented 2 years ago

Having the exact same error, and it usually works, but when HMR occurs with SvelteKit when a file is changed, the error is thrown 😕

riungemaina commented 2 years ago

I have opened a PR, that hopefully fixes this.