beyonk-group/svelte-carousel

Production error: TypeError: Xu is not a constructor on latest sveltekit

bridge-jithesh opened this issue · 2 comments

Hi, I am having a production error in the bundle. browser console says:

Uncaught (in promise) TypeError: Xu is not a constructor
    at vendor-ee02d4c9.js:15:24290
    at Ze (vendor-ee02d4c9.js:1:845)
    at Array.map (<anonymous>)
    at vendor-ee02d4c9.js:4:6191
    at pn (vendor-ee02d4c9.js:4:2492)
    at _e (vendor-ee02d4c9.js:4:7249)
    at new Te (start-b5777f44.js:1:6066)
    at We._init (start-b5777f44.js:1:19629)
    at We.start (start-b5777f44.js:1:17982)
    at async Me (start-b5777f44.js:1:24208)

Any idea what it could be?

I am using Sveltekit ^1.0.0-next.221, Svelte ^3.44.1

Very basic setup as in the demo. Works fine on npm run dev. No, build errors either.
You can reproduce it by running npm run build and npm run preview
Any idea what is the issue?

Getting nearly the same in production:

Uncaught (in promise) TypeError: ze is not a constructor
Ae Carousel.svelte:109
t index.mjs:18
_n index.mjs:1802
mn index.mjs:1067
t index.mjs:1405
wn index.mjs:1412

However, I was getting this in dev which makes more sense without the minification:
Uncaught (in promise) TypeError: Siema is not a constructor
D Carousel.svelte:110
run index.mjs:18
mount_component index.mjs:1802
flush index.mjs:1067
update index.mjs:1405
handle_promise index.mjs:1412
promise callback*handle_promise index.mjs:1410
create_fragment$z bundle.js:7006
init$1 index.mjs:1877
Carousel_1 bundle.js:7107
create_fragment$y bundle.js:7127
init$1 index.mjs:1877
Home bundle.js:7204
create_if_block_1$4 bundle.js:2131
create_if_block$8 bundle.js:1973
update bundle.js:2238
update index.mjs:1085
flush index.mjs:1052
init$1 index.mjs:1894
App bundle.js:21947
app main.js:3
bundle.js:21973
Carousel.svelte:110:12

I'm not using Svelte Kit, just svelte.

ncaught (in promise) TypeError: Siema is not a constructor
D Carousel.svelte:110
run index.mjs:18
mount_component index.mjs:1802
flush index.mjs:1067
update index.mjs:1405
handle_promise index.mjs:1412
promise callback*handle_promise index.mjs:1410
create_fragment$z bundle.js:7006
init$1 index.mjs:1877
Carousel_1 bundle.js:7107
create_fragment$y bundle.js:7127
init$1 index.mjs:1877
Home bundle.js:7204
create_if_block_1$4 bundle.js:2131
create_if_block$8 bundle.js:1973
update bundle.js:2238
update index.mjs:1085
flush index.mjs:1052
init$1 index.mjs:1894
App bundle.js:21947
app main.js:3
bundle.js:21973
Carousel.svelte:110:12

​Looks like this:

image

Should be:

image

I just found that leaving Svelte-Carousel at 2.8.0 fixed the problem and can update other deps:

"@beyonk/svelte-carousel": "~2.8.0"