react-lottie
react-lottie copied to clipboard
Error with Babel in versions 1.2.8 and 1.2.9
When running in development mode with Vite, any of the versions mentioned in the title causes the following error related to the Babel dependency:
Could not resolve "babel-runtime/helpers/inherits"
node_modules/react-lottie/dist/index.js:27:25:
27 │ var _inherits2 = require('babel-runtime/helpers/inherits');
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can mark the path "babel-runtime/helpers/inherits" as external to exclude it from the bundle,
which will remove this error and leave the unresolved path in the bundle. You can also surround
this "require" call with a try/catch block to handle this failure at run-time instead of
bundle-time.
Please review this dependency. I suggest checking out the new features of Babel, as many things have changed, and some functionalities may have been deprecated.
When running in development mode with Vite, any of the versions mentioned in the title causes the following error related to the Babel dependency:
Could not resolve "babel-runtime/helpers/inherits" node_modules/react-lottie/dist/index.js:27:25: 27 │ var _inherits2 = require('babel-runtime/helpers/inherits'); ╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can mark the path "babel-runtime/helpers/inherits" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle. You can also surround this "require" call with a try/catch block to handle this failure at run-time instead of bundle-time.Please review this dependency. I suggest checking out the new features of Babel, as many things have changed, and some functionalities may have been deprecated.
Me too: "react-lottie": "^1.2.3"
When running in development mode with Vite, any of the versions mentioned in the title causes the following error related to the Babel dependency:
Could not resolve "babel-runtime/helpers/inherits" node_modules/react-lottie/dist/index.js:27:25: 27 │ var _inherits2 = require('babel-runtime/helpers/inherits'); ╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can mark the path "babel-runtime/helpers/inherits" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle. You can also surround this "require" call with a try/catch block to handle this failure at run-time instead of bundle-time.Please review this dependency. I suggest checking out the new features of Babel, as many things have changed, and some functionalities may have been deprecated.
I install babel-runtime in dependencies then fixed it; Here are some comments:https://github.com/babel/babel/issues/10584#issuecomment-544725354
Hi @ashen114 @naml14 @larixk @tpae bebel-runtime is back in [email protected]
@chenqingspring Issue is also to be closed