close

[Fixed] Can’t import the named export ‘Children’ from non EcmaScript module (only default export is available)

Today We are Going To Solve Can’t import the named export ‘Children’ from non EcmaScript module (only default export is available) in react. Here we will Discuss All Possible Solutions and How this error Occurs So let’s get started with this Article.

How to Fix Can’t import the named export ‘Children’ from non EcmaScript module (only default export is available) Error?

  1. How to Fix Can’t import the named export ‘Children’ from non EcmaScript module (only default export is available) Error?

    To Fix Can’t import the named export ‘Children’ from non EcmaScript module (only default export is available) Error just Use this command. Here to solve this error just use this command: import {motion} from 'framer-motion/dist/es/index'

  2. Can’t import the named export ‘Children’ from non EcmaScript module (only default export is available)

    To Fix Can’t import the named export ‘Children’ from non EcmaScript module (only default export is available) Error just Import on that way. To solve this error you have to import in the given below way: import {AnimatePresence, motion} from 'framer-motion/dist/framer-motion'

Solution 1 : Use this command

Here to solve this error just use this command:

import {motion} from 'framer-motion/dist/es/index'

Solution 2 : Import on that way

To solve this error you have to import in the given below way:

import {AnimatePresence, motion} from 'framer-motion/dist/framer-motion'

Solution 3 : Install [email protected]

Here to solve this error first of all you have to uninstall framer-motion.

npm uninstall framer-motion

Then just Install [email protected] And your error will be solved.


npm install [email protected]

Conclusion

So these were all possible solutions to this error. I hope your error has been solved by this article. In the comments, tell us which solution worked? If you liked our article, please share it on your social media and comment on your suggestions. Thank you.

Also Read This Solutions

Leave a Comment