framer / motion

Open source, production-ready animation and gesture library for React
https://framer.com/motion
MIT License
23.86k stars 809 forks source link

[BUG] Cannot destructure property 'animation' of 'this.resolved' as it is undefined #2553

Closed simPod closed 8 months ago

simPod commented 8 months ago

Getting

Cannot destructure property 'animation' of 'this.resolved' as it is undefined

3. IMPORTANT: Provide a CodeSandbox reproduction of the bug

A CodeSandbox minimal reproduction will allow us to quickly follow the reproduction steps. Without one, this bug report won't be accepted.

4. Steps to reproduce

v11.0.12

image

5. Expected behavior

No issue.

7. Environment details

v11.0.8 had no issue

andylacko commented 8 months ago

thx @simPod , for pointing out the working version, didn't have to try downgrading myself

michaelcais commented 8 months ago

I had the same error, but was able to resolve it by checking on the values I assigned to my animations. In my case, I had the following;

<motion.div
initial={{ y: '-10' }} 
animate={{ y: 0 }} 
transition={{ 
  duration: 0.15,
  type: 'spring',
  stiffness: 120,
  ease: 'easeInOut'
}}
>

This used to work on earlier versions, but with the latest version, I had to remove the enclosed quotes for initial={{ y: -10 }}

Johnrobmiller commented 8 months ago

I had the same error, but was able to resolve it by checking on the values I assigned to my animations. In my case, I had the following;

<motion.div
initial={{ y: '-10' }} 
animate={{ y: 0 }} 
transition={{ 
  duration: 0.15,
  type: 'spring',
  stiffness: 120,
  ease: 'easeInOut'
}}
>

This used to work on earlier versions, but with the latest version, I had to remove the enclosed quotes for initial={{ y: -10 }}

I also ran into this issue, although this fix did not work for me as none of the props were wrapped in enclosing quotes.

Downgrading to 11.0.8 fixed the issue, however.

michaelcais commented 8 months ago

I apologize, the error is indeed still there when navigating to the page. Refreshing the browser on the same page however, did not trigger the error so I thought it got fixed when I was working on another error regarding errors.mjs:8 You are trying to animate y from "-10" to "0". -10 is not an animatable value previously.

mattgperry commented 8 months ago

Please open a ticket with a sandbox demonstrating the bug

simPod commented 7 months ago

This may be fixed in .14 https://github.com/framer/motion/compare/v11.0.13...v11.0.14

I'll try to deploy it.

simPod commented 7 months ago

Lookin good