Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with Babel in versions 1.2.8 and 1.2.9 #178

Open
naml14 opened this issue Nov 26, 2024 · 2 comments
Open

Error with Babel in versions 1.2.8 and 1.2.9 #178

naml14 opened this issue Nov 26, 2024 · 2 comments

Comments

@naml14
Copy link

naml14 commented Nov 26, 2024

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.

@ashen114
Copy link

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"

@ashen114
Copy link

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:babel/babel#10584 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants