-
Notifications
You must be signed in to change notification settings - Fork 29
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 error on import #15
Comments
You have to use Install
Then add it into your project (e.g. to import 'babel-polyfill'; That's it! |
Thank you so much for your quick reply and help! So here's the issue - and I'm still very much learning about all of this. It seems like create-react-app includes the regenerator runtime (as well as other parts of babel-polyfill) automatically if you're using generator functions: facebook/create-react-app#190 I have verified that my normal generators/sagas work just fine in Safari, for example, which has no support for generator functions out of the box. This is also why if I just use the non-npm version of redux-form-saga as a file in This might even be an issue for create-react-app, I'm just trying to understand it all. Thanks again for your time |
OK I've got it working without having to import all of babel-polyfill - I added this line to my entry file: import 'regenerator-runtime/runtime' And that makes the regeneratorRuntime available globally, not just in |
I'm getting this error on import (nothing else is able to run) when using the npm package:
where index.js refers to
node_modules/redux-form-saga/lib/index.js
I created a file in my src with the uncompiled contents of index.js from the repo, and it loads fine. Not exactly sure what to do here - any help would be appreciated.
I'm using create-react-app v0.8.2
The text was updated successfully, but these errors were encountered: