[BUG] Gatsby build fails after update to framer-motion 3.X
See original GitHub issueDescribe the bug We use framer-motion with gatsby-js. After update to framer-motion v.3, the gatsby build process fails with the following error message:
ReferenceError: performance is not defined at Timeout._onTimeout (/......./public/render-page.js:8952:25) at listOnTimeout (internal/timers.js:551:17) at processTimers (internal/timers.js:494:7) /......./public/render-page.js:8952 return callback(performance.now());
After downgrading to framer-motion 2.9.5, everything works fine again. It may well be that the error also occurs with other frameworks using SSR like next.js?
Steps to reproduce
- Install latest gatsby version.
- Install framer-motion 3.x
- run gatsby build
Issue Analytics
- State:
- Created 3 years ago
- Comments:6
Top Results From Across the Web
Gatsby build / SSR swapping out components causing display ...
I use framer-motion for page transitions and have added my layout component to gatsby-browser so that only page content gets transitioned, and ......
Read more >Gatsby builds failing for no reason - Netlify Support Forums
Every build is failing for seemingly no fault of my own. I'm getting 2 main errors: Error: Cannot find module 'webpack/lib/RequestShortener' ...
Read more >Chakra UI + Framer Motion
The chakra factory function can be used to represent animation and interaction using framer motion props, as in the example below.
Read more >Accessibility | Framer for Developers
Framer Motion provides APIs that make it simple to respect these people's preferences. In this guide, we'll learn how to use the reducedMotion...
Read more >Building a Hamburger Menu using Gatsby and Framer Motion
0:00 · New ! Watch ads now so you can enjoy fewer interruptions. Got it.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I feel like this might mean you’re running an animation on the server, maybe with
animate
, from a render function. I’m not sure, maybe something to keep an eye out for. In the meantime can you try3.6.4
? I’ve added a polyfill forperformance.now
.Unfortunately, I’m having the same issue framer-motion version is ^4.1.17