Error with Framer Motion in Sanity + Gatsby monorepo
11 replies
Last updated: May 17, 2021
A
I am getting this error trying on
first time gotten this and it was working fine. Anyone can shine some lights for me what went wrong?
yarn ; yarn devfor 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'
May 17, 2021, 8:50 AM
P
Hi
user U
, could you remove your node_modulesfolder and
package-lock.json+
yarn-lock.jsonfiles before running
npm install(or
yarn install) and trying once more?
May 17, 2021, 9:02 AM
A
hey i tried that but im getting the same error
May 17, 2021, 9:03 AM
P
Hi
user U
, could you remove your node_modulesfolder and
package-lock.json+
yarn-lock.jsonfiles before running
npm install(or
yarn install) and trying once more?
May 17, 2021, 9:02 AM
A
lemme try that again
May 17, 2021, 9:03 AM
S
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
A
ah mine was local shown the error but on netlify it compiles just fine 😅
May 17, 2021, 11:03 AM
A
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
A
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
P
Could you try doing the above routine once more but before running
npm install, run
sanity installfirst?
May 17, 2021, 12:20 PM
A
this works!!
So running
user M
So running
sanity installthen
npm installworks
May 17, 2021, 2:03 PM
P
That's great, thanks for confirming! 🙂
May 17, 2021, 2:04 PM
Sanity– build remarkable experiences at scale
The Sanity Composable Content Cloud is the headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.