Error - Cannot create proxy with a non-object as target or handler #565
Replies: 3 comments
-
Interestingly, when I run this inside codepen, I get a different error so I suspect there's something wrong with my project too. https://codepen.io/padders1980/pen/XWXdrWV
|
Beta Was this translation helpful? Give feedback.
-
@padders, you need to return an object from the |
Beta Was this translation helpful? Give feedback.
-
Ah ok, that makes sense (I think!) Updating my codepen now works perfectly, although running it in my project doesn't for some reason. Thank you :) |
Beta Was this translation helpful? Give feedback.
-
Hi Guys,
I'm very new to Alpine and I'm probably making a mistake. We're trying to run a GSAP animation that is loaded using x-init (to make sure the dom is available). We then want to be able to control that animation by clicking elements on the screen. I created a function that initialises the timeline, and runs the animation based on Scroll triggering, all of that works perfectly when used without alpine, but when called with alpine i get the following error.
Uncaught (in promise) TypeError: Cannot create proxy with a non-object as target or handler
I was also struggling to use the x-on method to run the click, as it needs to access the GSAP timeline that is created in my showCard function and I couldn't figure out how to create it and access it using alpine, so I suspect I'm doing something dim but I'm not sure what!
Alpine is installed using npm and imported into the projects main js file.
The html and JS I'm using is as follows
Beta Was this translation helpful? Give feedback.
All reactions