ReferenceError: regeneratorRuntime is not defined
See original GitHub issueAfter upgrading from 2.4.1 to 2.4.2, I’m now seeing the following error:
ReferenceError: regeneratorRuntime is not defined
Issue Analytics
- State:
- Created 4 years ago
- Reactions:8
- Comments:14 (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 - Stack Overflow
This only works because it no longer transforms async/await and thus no longer needs the regeneratorRuntime and because it's not transformed it ...
Read more >ReferenceError regeneratorRuntime is not defined · Issue #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 >regeneratorRuntime is not defined when running jest test
I got the ReferenceError: regeneratorRuntime is not defined error. Please attach your logs beforehand. ○ Test suite failed to run ReferenceError: ...
Read more >Parcel, how to fix the `regeneratorRuntime is not defined` error
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 >
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 Free
Top 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
I’ve encountered the same problem. My solution was very similar to @Tassfighter . Here is my solution I’m using Next JS, for Next JS Add these to your package.json
"dependencies": { "core-js": "^3.3.5", "regenerator-runtime": "^0.13.3" }, "devDependencies": { "@babel/core": "^7.6.4", }
my .babelrc file
{ "presets": [["next/babel", { "useBuiltIns":"entry", "corejs":3 }]] }
in _document.js import theseimport "core-js"; import regeneratorRuntime from "regenerator-runtime";
For normal setups other than Next JS, below is the configuration Add these to your package.json
"dependencies": { "core-js": "^3.3.5", "regenerator-runtime": "^0.13.3" }, "devDependencies": { "@babel/core": "^7.6.4", "@babel/preset-env": "^7.6.3" }
my .babelrc file
{ "presets": [["@babel/preset-env", { "useBuiltIns":"usage", "corejs":3 }]] }
If you are using “usage” option you don’t need to import core-js and regenerator-runtime, but Next JS creates a problem if you are using “usage” option. You need to use “entry” option and import the files in Next JS.
@Tassfighter this library should list all their dependencies. And if another library uses a different version of regeneratorRuntime, it will be handled as it is handled with all other libraries. It’s a common issue. The behavior as it is now is a bug.