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

ReferenceError: regeneratorRuntime is not defined #5510

Closed
titouancreach opened this issue Feb 7, 2019 · 6 comments
Closed

ReferenceError: regeneratorRuntime is not defined #5510

titouancreach opened this issue Feb 7, 2019 · 6 comments
Assignees
Labels
Milestone

Comments

@titouancreach
Copy link

titouancreach commented Feb 7, 2019

Describe the bug
I just migrated from v5 alpha to v5 beta. Now I can see in the console: "ReferenceError: regeneratorRuntime is not defined". I've so added babel-plugin-transform-runtime to the list of my babel plugins but nothing changed (I think this include only the polyfill to my code and not to Storybook) .

To Reproduce
Steps to reproduce the behavior:

  • Storybook that work well in v5 alpha
  • Upgrade to v5 beta
  • Run Storybook
  • Blank page with error in the console

Expected behavior
Storybook that run

Screenshots
Should not be very usefull but here is the code that throw
image

System:

  • OS: [Linux]
  • Device: [All]
  • Browser: [chrome]
  • Framework: [react]
  • Version: tested with: 5.0.0-beta.1 and 5.0.0-beta-3

Thanks for reading :)

@titouancreach titouancreach changed the title ReferenceError: regeneratorRuntime is not defined [v5.0.0-beta.1] ReferenceError: regeneratorRuntime is not defined Feb 7, 2019
@tmeasday tmeasday added this to the v5.0.0 milestone Feb 14, 2019
@tmeasday
Copy link
Member

Hi @titouancreach, any chance you could upload your code somewhere?

The issue is in the ui code (ie not your code controlled by your babel config). The regenerator runtime should be part of the manager webpack config. Can you try with the latest beta (beta.3)?

@titouancreach
Copy link
Author

titouancreach commented Feb 14, 2019

Thanks for replying @tmeasday,
5.0.0-beta.3 doesn't fix this bug. I've created a minimal reproduction based on create-react-app here

@titouancreach titouancreach changed the title [v5.0.0-beta.1] ReferenceError: regeneratorRuntime is not defined [v5.0.0-beta.3] ReferenceError: regeneratorRuntime is not defined Feb 14, 2019
@tmeasday tmeasday self-assigned this Feb 14, 2019
@tmeasday tmeasday changed the title [v5.0.0-beta.3] ReferenceError: regeneratorRuntime is not defined ReferenceError: regeneratorRuntime is not defined Feb 15, 2019
@tmeasday
Copy link
Member

🙏 @titouancreach

You know it is interesting, I defaulted to installing via yarn and your repro worked fined. Then I saw you had a package-lock.json, installed via npm, and it failed. A bit of a hint I think 😉

@tmeasday
Copy link
Member

tmeasday commented Feb 15, 2019

Aha! I knew this would come to bite us! The issue is you have put in ^5.0.0-beta.3 in your package.json but a while back we released a 5.0.0-debug.3 (which matches that specifier sadly). In retrospect this was an error which we will avoid in the future.

If you change to an exact match (5.0.0.beta.3) it'll work fine.

Sorry about this!

@titouancreach
Copy link
Author

Nice, I was wondering why storybook show "5.0.0-debug-3" in the console! Thank :)

@juliankrispel
Copy link

I'm on 6.1.10 and I'm experiencing this issue :/

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