Error with Framer Motion in Sanity + Gatsby monorepo

11 replies
Last updated: May 17, 2021
I am getting this error trying on
yarn ; yarn dev
for sanity + Gatsby monorepo for studio.
./node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.js170:20-29 "export 'flushSync' was not found in 'framesync'./node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.js171:20-29 "export 'flushSync' was not found in 'framesync'./node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.js172:20-29 "export 'flushSync' was not found in 'framesync'./node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.js173:20-29 "export 'flushSync' was not found in 'framesync'./node_modules/framer-motion/dist/es/components/AnimateSharedLayout/utils/batcher.js58:20-29 "export 'flushSync' was not found in 'framesync'./node_modules/framer-motion/dist/es/components/AnimateSharedLayout/utils/batcher.js59:20-29 "export 'flushSync' was not found in 'framesync'
first time gotten this and it was working fine. Anyone can shine some lights for me what went wrong?
May 17, 2021, 8:50 AM
Hi
user U
, could you remove your
node_modules
folder and
package-lock.json
+
yarn-lock.json
files before running
npm install
(or
yarn install
) and trying once more?
May 17, 2021, 9:02 AM
hey i tried that but im getting the same error
May 17, 2021, 9:03 AM
Hi
user U
, could you remove your
node_modules
folder and
package-lock.json
+
yarn-lock.json
files before running
npm install
(or
yarn install
) and trying once more?
May 17, 2021, 9:02 AM
lemme try that again
May 17, 2021, 9:03 AM
Some colleague of me had the same error on Vercel (local was fine) and he redeploy and suddenly started working normal 🙂
May 17, 2021, 11:03 AM
ah mine was local shown the error but on netlify it compiles just fine 😅
May 17, 2021, 11:03 AM
hmm i’ve tried all sorts and its so weird this happens when i restarted my computer. It compiles just fine on netlify so I can access the studio on netlify but not locally… 🤔
May 17, 2021, 12:18 PM
hmm i’ve tried all sorts and its so weird this happens when i restarted my computer. It compiles just fine on netlify so I can access the studio on netlify but not locally… 🤔
May 17, 2021, 12:18 PM
Could you try doing the above routine once more but before running
npm install
, run
sanity install
first?
May 17, 2021, 12:20 PM
this works!!
user M

So running
sanity install
then
npm install
works
May 17, 2021, 2:03 PM
That's great, thanks for confirming! 🙂
May 17, 2021, 2:04 PM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?