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
[BUG] TypeError: Cannot read properties of undefined (reading 'needsInterpolation') when using SVG Paths, Next 13, and SWC #1847
Comments
@shaunchander was facing the same issue today, |
There’s never been a |
Ah, thanks @mattgperry. |
Just reopening so I remember to make this more defensive! |
I have the same issue with next 13.1.1 |
Same issue with Next.js v13.0.2 TS |
I'm getting the same error with version Nextjs 14.1.0 |
According to the latest framer-motion docs, it seems From the docs:"A transition defines how values animate from one state to another. It can also accept props that define which type of animation to use, you can choose one of these: Value-specific transitionsA different set of transition settings can be defined for each specific value. Also there's the concept of frame-motion's easing functions, so use it like bellow and that should work. transition={{
ease: "linear"
}} These strings are the built-in named easing functions in Framer. "linear" As the strings above, I hope it can help you guys 🙌 |
When using a motion path component (
<m.path />, <motion.path />
) with Next 13, theres' a client-side error that pops up sayingCannot read properties of undefined (reading 'needsInterpolation')
.I've reproduced the issue here: https://codesandbox.io/p/sandbox/magical-snowflake-9flnn5?file=%2Fpages%2Findex.tsx&selection=%5B%7B%22endColumn%22%3A11%2C%22endLineNumber%22%3A3%2C%22startColumn%22%3A11%2C%22startLineNumber%22%3A3%7D%5D
This issue breaks any SVG path animation (as in, animations don't play) in both dev and prod environments.
I'm willing to investigate this further to see if there's a potential quick fix!
EDIT: This also occurs within Vite w/Typescript and SWC, which leads me to believe this is SWC-specific.
The text was updated successfully, but these errors were encountered: