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
[Bug]: @babel/runtime v7.18.0 cause a runtime "regeneratorRuntime is not defined" error #14576
Comments
Hey @tinder1024! We really appreciate you taking the time to report an issue. The collaborators on this project attempt to help as many people as possible, but we're a limited number of volunteers, so it's possible this won't be addressed swiftly. If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack community that typically always has someone willing to help. You can sign-up here for an invite. |
Is the error coming from your code or from a dependency? Which is the full stack trace? The |
same issue |
I "found" the solution Or rather, the comment about this issue ahsuahush I solved it by forcing the version in
|
This is a bug with some other packages that has a dependency on Please, always share your stacktraces so that we can report this to the buggy packages! |
[CompileProject][INFO] Error: [vite]: Rollup failed to resolve import "@babel/runtime/helpers/esm/regeneratorRuntime" from "node_modules/@ant-design/pro-card/node_modules/@ant-design/pro-utils/es/hooks/useDebounceFn/index.js". |
lock the old dependency version: |
NoteThe |
none of the suggested solutions in the comment works for us |
@drbeat Can you share a gist containing your lockfile? |
So after setting @babel/preset-react in resolutions it works now. |
Solved by replacing @babel/runtime": "^7.16.3" with @babel/runtime": "7.16.3" |
This implies that if I add I'm declaring this dependency and still get the error. In my case, the stacktrace is:
|
You also have to import that library in your code, since it's side-effectful. |
I opened #14581 to make this error more rare. However, please continue reporting this bug to the affected libraries so that they can fix it. |
babel版本的问题,我删除旧的依赖,重新安装解决了这个问题;虽然我的两个项目使用了不同方式来处理,但是最终生效都是babel/runtime版本更新到7.18.3! |
error Generating JavaScript bundles failed |
Update rc-util. |
💻
How are you using Babel?
babel-loader (webpack)
Input code
placehoder
Configuration file name
No response
Configuration
No response
Current and expected behavior
I thought the problem might be
Environment
@babel/runtime version 7.18.0
Possible solution
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: