Skip to content
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

bug(core): async/await code in profileFactory causes "regeneratorRuntime is not defined" error #786

Closed
hunterbecton opened this issue Oct 29, 2019 · 5 comments
Labels

Comments

@hunterbecton
Copy link

What is the current behavior?

Getting WebpackError: ReferenceError: regeneratorRuntime is not defined on react-redux-firebase packages when I run gatsby develop or gatsby build.

I've tried installing and adding plugins like @babel/plugin-transform-runtime to a .babelrc file without any luck.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via codesandbox or similar.

Clone repo: https://github.com/hunterbecton/st-bug-1.git

Run npm install

Run gatsby develop

What is the expected behavior?

Successful develop and build without errors.

Which versions of dependencies, and which browser and OS are affected by this issue? Did this work in previous versions or setups?

Nothing has been updated or changed to my knowledge. I easily replicated the issue by moving all the config and setup files from my original project into a new gatsby project (reflected in the repo above.)

System:
OS: macOS 10.14.2
CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 11.14.0 - /usr/local/bin/node
npm: 6.12.0 - /usr/local/bin/npm
Languages:
Python: 2.7.10 - /usr/bin/python
Browsers:
Chrome: 78.0.3904.70
Firefox: 69.0.1
Safari: 12.0.2

@prescottprue
Copy link
Owner

prescottprue commented Oct 30, 2019

Thanks for reporting - I believe this is due to the recent addition of async/await code in v3.0.3 (from this PR for adding promise support for profileFactory by @dannyvaughton). I'll look into removing that, but in the meantime you should be able to go back to v3.0.1 or v3.0.0.

Didn't realize this would be breaking or else it wouldn't have gone out in a patch. I'll update this issue with progress on the fix. Also, tagging @cruzdanilo here since he mentioned the issue in the PR

prescottprue pushed a commit that referenced this issue Oct 31, 2019
* fix(profile): remove async/await code causing regeneratorRuntime error (drops promise support for profileFactory) - #786, #778
@prescottprue
Copy link
Owner

@dannyvaughton I am going to start by removing promise support for the profileFactory in v3.0.4, then I'll add back that support in a later version in a way that is not breaking for this type of setup (most likely without async/await).

Thanks to all for reaching out

@dannyvaughton
Copy link
Contributor

@prescottprue Sure, no worries. Sorry, I had no idea this was breaking either.

@prescottprue
Copy link
Owner

All good! I'm sure we will figure out a way to get it in there without a breaking change - just wanted to make sure you knew that the next patch release would break any promise logic you have in the profileFactory

@prescottprue prescottprue changed the title WebpackError: ReferenceError: regeneratorRuntime is not defined bug(core): async/await code in profileFactory causes "regeneratorRuntime is not defined" error Oct 31, 2019
@prescottprue prescottprue mentioned this issue Oct 31, 2019
3 tasks
prescottprue added a commit that referenced this issue Oct 31, 2019
* fix(profile): remove async/await code causing regeneratorRuntime error (drops promise support for profileFactory) - #786, #778
@prescottprue
Copy link
Owner

Fixed in v3.0.4 - thanks for reaching out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants