`regeneratorRuntime` is not defined
See original GitHub issueThis is a:
- Bug Report
Which concerns:
- flow-runtime
What is the current behaviour?
flow-runtime.min.js:3 Uncaught (in promise) ReferenceError: regeneratorRuntime is not defined
at eval (flow-runtime.min.js:3)
at eval (flow-runtime.min.js:3)
What is the expected behaviour?
Throw error
Please add babel-plugin-transform-runtime
is your .babelrc
Which package versions are you using?
0.2.1
Issue Analytics
- State:
- Created 7 years ago
- Reactions:3
- Comments:12 (1 by maintainers)
Top Results From Across the Web
How to fix regeneratorRuntime is not defined?
I have ran into a problem, the error is regeneratorRuntime is not defined while working with React and Parcel bundler.
Read more >Babel 6 regeneratorRuntime is not defined
This error is caused when async/await functions are used without the proper Babel plugins. As of March 2020, the following should be all...
Read more >ReferenceError regeneratorRuntime is not defined #9849
I'm building an SSR template, and when I use @babebl/register and then execute webpack (config), the system reported an error.
Read more >Parcel, how to fix the `regeneratorRuntime is not defined` ...
I run into this problem in a project using Babel as soon as I added an async function, but the problem is the...
Read more >regeneratorRuntime is not defined when running jest test
I got the ReferenceError: regeneratorRuntime is not defined error. ... Though, "regenerator-runtime" is present in package.json and installed.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
In my case, I add a line of code in webpack.dev.config file. Please comments if it’s not correct.
The correct solution to this is to add https://babeljs.io/docs/plugins/transform-runtime/ to the babel config for flow-runtime. You do not need to worry about this causing a duplicate version of the regenerator runtime to exist, because flow-runtime should not be used in production anyway, and the regenerator-runtime added by babel-plugin-transform-runtime does not pollute the global scope, so it won’t conflict with any applications that use regenerator themselves. Without this, libraries that use flow-runtime will not work out of the box.
I’m going to be forced to abandon flow-runtime until this is fixed.