-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
regeneratorRuntime is not defined #34
Comments
@eostrom try the solution in the following link. It worked for me. Here is how my .babelrc file looks like
|
Yeah, the key there is preset-env. Regenerator allows you to do generators with ES5 code and the way that async/await is translated is by making it work with generators. So once you started targeting node: current it basically told Babel to stop translating from async/await to ES5-compatible Regenerator code. |
There is a known bug in parcel that can cause this error, regardless of how your |
After adding Babel in the Class Components lesson, I restarted the server with
npm run dev:mock
, chose an animal and a breed, pressed Submit, and got this:I don't fully understand the cause or how to solve it, but from a Babel issue I think the gist is that Babel is generating code that depends on
babel-polyfill
, and we aren't including it. I got the code running again by addingimport "babel-polyfill";
to the top ofApp.js
, but that might not be the best solution.I'm also getting some build warnings that may or may not be related:
The text was updated successfully, but these errors were encountered: