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
Uncaught ReferenceError: regeneratorRuntime is not defined #3962
Comments
@tannerlinsley You can see that
|
Which would you suggest?
Tanner Linsley
…On May 24, 2022, 5:36 PM -0600, Nicolò Ribaudo ***@***.***>, wrote:
@tannerlinsley You can see that regeneratorRuntime is used at line 272 of ***@***.***/dist/react-table.development.js, but it's not defined anywhere. You can fix it in one of the following ways:
• Add @babel/runtime to your Babel config, which loads the helpers from @babel/runtime (including regeneratorRuntime)
• Manually add import "regenerator-runtime" in your source, which defines the regeneratorRuntime global
• Update @babel/core and @babel/plugin-transform-regenerator to 7.18.0, so that the generated code doesn't rely on the regeneratorRuntime global anymore.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Ah I see this is for v7 too. I’ll accept a PR to fix it if you’re up to it.
Tanner Linsley
…On May 24, 2022, 5:36 PM -0600, Nicolò Ribaudo ***@***.***>, wrote:
@tannerlinsley You can see that regeneratorRuntime is used at line 272 of ***@***.***/dist/react-table.development.js, but it's not defined anywhere. You can fix it in one of the following ways:
• Add @babel/runtime to your Babel config, which loads the helpers from @babel/runtime (including regeneratorRuntime)
• Manually add import "regenerator-runtime" in your source, which defines the regeneratorRuntime global
• Update @babel/core and @babel/plugin-transform-regenerator to 7.18.0, so that the generated code doesn't rely on the regeneratorRuntime global anymore.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
We released 7.18.2 of |
Of the solutions above, the best thing would be to do (1) and (3). Only (3) would be enough, but pairing it with (1) should result in a bundle size benefit for your users. |
I'm open to a PR for this any time in the future. |
Despite this issue being closed, I saw this error, not in my own code, but in an example published on CodeSandbox to illustrate how to use react-table. Check it out here: https://codesandbox.io/p/sandbox/github/tannerlinsley/react-table/tree/v7/examples/filtering Added to that, in the package.json file, the version of React is specified as "^16.8.6". Are there any examples somewhere with more recent versions of react available for this module? |
Describe the bug
babel-runtime@7.18.0
no longer includesregenerator-runtime
dependency.As a result, this happens:
I believe this is related to #3297.
According to babel/babel#14576 the fix is to add
regenerator-runtime
as a dependency.Your minimal, reproducible example
Don't know how to reproduce babel usage in codesandbox
Steps to reproduce
useAsyncDebounce
Expected behavior
Expecting no runtime error.
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
Windows Chrome
react-table version
7.8.0
TypeScript version
No response
Additional context
No response
Terms & Code of Conduct
The text was updated successfully, but these errors were encountered: