Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New breaking error with latest kit and vite 4.0.0... #28

Open
rchrdnsh opened this issue Dec 10, 2022 · 8 comments
Open

New breaking error with latest kit and vite 4.0.0... #28

rchrdnsh opened this issue Dec 10, 2022 · 8 comments

Comments

@rchrdnsh
Copy link

rchrdnsh commented Dec 10, 2022

to the latest kit and vite (1.0.0-next.581 for kit and 4.0.0 for vite) and getting the following breaking error:

Cannot read properties of undefined (reading '__assign')
TypeError: Cannot read properties of undefined (reading '__assign')
    at /node_modules/svelte-motion/node_modules/popmotion/node_modules/style-value-types/dist/es/numbers/index.js:9:12
    at async instantiateModule (file:///Users/rchrdnsh/Code/Svelte/RYKR-kit/node_modules/vite/dist/node/chunks/dep-ed9cb113.js:53246:9)

...dunno what's going on, but site updates are out of commission until this can be resolved.

@rchrdnsh
Copy link
Author

hmmm...wondering if popmotion needs to updated to a more recent version? it's on 11.0.5 but the version in the svelte-motion package.json is 9.3.5...I figure you are aware of that, but maybe something has been updated since then that might affect this error?

@rchrdnsh
Copy link
Author

another update...pushed it to github and it built and runs in production...just totally broken in dev.

@rchrdnsh
Copy link
Author

got another one tonight trying to re-install the library:

Cannot read properties of undefined (reading 'linear')
TypeError: Cannot read properties of undefined (reading 'linear')
    at /node_modules/svelte-motion/src/animation/utils/easing.js:12:12
    at async instantiateModule (file:///Users/rchrdnsh/Code/Svelte/RYKR-kit/node_modules/vite/dist/node/chunks/dep-ed9cb113.js:53246:9)

...which seems to be a similar type of issue, just with something different. Maybe it's due to Vite 4.0.0 switching to Rollup 3.something...

@tiagoapp
Copy link

got another one tonight trying to re-install the library:

Cannot read properties of undefined (reading 'linear')
TypeError: Cannot read properties of undefined (reading 'linear')
    at /node_modules/svelte-motion/src/animation/utils/easing.js:12:12
    at async instantiateModule (file:///Users/rchrdnsh/Code/Svelte/RYKR-kit/node_modules/vite/dist/node/chunks/dep-ed9cb113.js:53246:9)

...which seems to be a similar type of issue, just with something different. Maybe it's due to Vite 4.0.0 switching to Rollup 3.something...

I'm getting this one as well after update SvelteKit / Vite 4.0.1

@rchrdnsh
Copy link
Author

gonna try and make a minrep of this...

@rchrdnsh
Copy link
Author

k, here is the minrep:

https://github.com/rchrdnsh/motion-issue

simply a skeleton kit project with the latest kit and vite, with only one <Motion> component imported into only one +page.svelte

same error message...

@micha-lmxt
Copy link
Owner

Thank you for the repo and the efforts. I've updated the version of popmotion and framesync. Building works for me now. For dev, tslib seems to be in a format, which vite 4 currently does not like.
Bloody workaround is to go into node_modules/tslib:

  1. Add 'type':'module' in package.json
  2. In tslib/modules/index.js change first line to ˋimport * as tslib from '../tslib.js'ˋ

Hope this helps.

@rchrdnsh
Copy link
Author

yay, thank you, I got it working now as well...

Was looking at the tslib package file and noticed this:

"exports": {
        ".": {
            "module": "./tslib.es6.js",
            "import": "./modules/index.js",
            "default": "./tslib.js"
        },
        "./*": "./*",
        "./": "./"
    }

...maybe there is a way of specifying ESM vs CJS or soemthing when importing from the lib? I don't understand this stuff very much, tho...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants