-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Seems like framer-motion fallback does not work with webpack 5 #5812
Comments
Getting the exact same problem here when using Storybook 6.4.20 with Webpack 5. |
Getting a similar error on a new install of @chakra-ui CRA template. eg The just
Can confirm |
it's crazy, this error keeps reoccurring |
I did a clear CRA install and installed Chakra and I have same issue there. On existing projects downgrading to Any information on versions that work with newer framer-motion versions? 🚀 |
I guess the easiest would be to drop support for |
Found a better workaround if downgrading is not possible! 💥
Add following resolution to package.json Hope this will do until we get a proper fix! 🙃 |
Hey @lahlim! Thanks for the input! Thanks! Works for now 👌 |
Thank you |
Turns out the latest version breaks chakra+framer-motion. See chakra-ui/chakra-ui#5812
Turns out the latest version breaks chakra+framer-motion. See chakra-ui/chakra-ui#5812
Roll back and pin webpack to 5.70, as 5.71 breaks chakra-ui with framer-motion per chakra-ui/chakra-ui#5812
Roll back and pin webpack to 5.70, as 5.71 breaks chakra-ui with framer-motion per chakra-ui/chakra-ui#5812
Roll back and pin webpack to 5.70, as 5.71 breaks chakra-ui with framer-motion per chakra-ui/chakra-ui#5812
Thanks buddy |
Hi, The webpack version modification did not work for us. What we did involve two mods and add " && typeof motion.custom" :
|
This seems to have been fixed in webpack 5.72.0? via webpack/webpack#15634 |
I just ran a few tests, and upgrading either |
This issue is a duplicate of #5804 and I think it can be closed now |
Hey! Thanks for the input! Unfortunately this does not really work for me, I have updated and now get the error:
Again it's UPDATEI have managed to get it working! 🙌 I'm not really sure what I'm doing anymore - literally randomly trying out things to get stuff working... What has happened to the JavaScript world? Almost every package I had was updated and resulted in breaking changes - I need a new job 🙈 Solution (at least for me):
Don't forget to install The key was to add .js to |
I had this issue on my nx 13 workspace too. I had to downgrade framer motion to 3.10.6, but does anyone know the workaround I would need for a non CRA project? My webpack version in the nx workspace is 5.58. So it does not make sense to have these issues. |
Webpack muss auf der Version 5.70 bleiben, siehe chakra-ui/chakra-ui#5812
Downgrading framer-motion to 3.10.6 results into more errors for me, from "can't resolve @zag-js/focus-visible" to "can't resolve aria-hidden" and so on. Still working on figuring out what the problem is. |
I have a pretty complex monorepo which I now just got working with Yarn 3 workspaces, webpack 5, craco and react-scripts. It's been an absolute nightmare so far and when I though I got it working, Chakra made problems.
I'm not entirely sure what causes the problem - it is nearly impossible to figure out which package is the trouble maker but I think I have narrowed it down to your implementation of
framer_motion.motion.custom()
(v3^) orframer_motion.motion()
(v4^ | v5^ | v6^). I'm not sure what webpack does here but I guess it injects a placeholder for framer-motion and since I only haveframer-motion v6^
it does not know what to do.I get the error:
And going through my bundled source I could find the affected line:
However, downgrading to
framer-motion v3.10.6
solves the issue but I doubt that this is a good workaround.Can anyone help? Is this a webpack error?
Chakra UI Version
NEWEST
Browser
Safari
Operating System
The text was updated successfully, but these errors were encountered: