Storybook: Build creating nested storybook UI - Inception!

Created on 16 Jan 2019  路  8Comments  路  Source: storybookjs/storybook

Describe the bug
A clear and concise description of what the bug is.
Using vanilla Create-React-App, then add storybook, then run build-storybook. Here is the results:
screen shot 2019-01-16 at 11 39 14 am

To Reproduce
Steps to reproduce the behavior:

  • Run CRA
  • Add storybook
  • Run build-storybook
  • serve the results

Expected behavior
A clear and concise description of what you expected to happen.
Storybook should look the same as when you use yarn storybook

Screenshots
If applicable, add screenshots to help explain your problem.

screen shot 2019-01-16 at 11 39 14 am

Code snippets
If applicable, add code samples to help explain your problem.

System:

  • OS:MacOS
  • Device: Macbook Pro 2018
  • Browser: Chrome latest
  • Framework: React
  • Addons: None - Using CRA to bootstrap app
  • Version: 4.1.6 and Latest

Additional context
Add any other context about the problem here.

bug cra needs reproduction

Most helpful comment

Found the same issue, to reproduce it:

serve -s storybook-static

Removing the single page app flag fixes it:

serve storybook-static

All 8 comments

Hi @dstroot, thanks for the report.

I tried to reproduce this with [email protected] and @storybook/[email protected] and I am not seeing the problem. I opened the built storybook directly (as in file://) and served it with npx serve.

I wonder how you are serving your built storybook? Perhaps it is somehow redirecting /iframe.html to /?

@tmeasday His screenshot is from SB5, not SB4. However I was not able to reproduce on 5.0.0-alpha.4 (the latest next). I tried both serve and file:// params.

Found this other nice bug while trying to repro 馃槈 : https://github.com/storybooks/storybook/issues/5274

I am going to close this - just tried again with npx serve and no issues. I was using "serve" installed globally (npm -g) but I doubt that is the real root cause. So weird - yesterday no matter what I could not get it to work and today is works great.

Found the same issue, to reproduce it:

serve -s storybook-static

Removing the single page app flag fixes it:

serve storybook-static

@efmr > Gah! That was it!

I encountered this same resulting nested storybook behavior but the cause of the bug was slightly different. There is a bug in the babel 7.7.0 release, reported here. As a result of these type errors, my storybook build fails but then renders like the image above. Once this fix is out in a release, it should be safe to upgrade, but until then you may want to lock in the babel 7.6 minor version.

Thanks @ksegal! Hope they get that fix out soon 馃檹

Was this page helpful?
0 / 5 - 0 ratings

Related issues

purplecones picture purplecones  路  3Comments

alexanbj picture alexanbj  路  3Comments

shilman picture shilman  路  3Comments

rpersaud picture rpersaud  路  3Comments

ZigGreen picture ZigGreen  路  3Comments