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

Storybook/html not building properly #5547

Closed
grumpyoldman-io opened this issue Feb 11, 2019 · 5 comments
Closed

Storybook/html not building properly #5547

grumpyoldman-io opened this issue Feb 11, 2019 · 5 comments

Comments

@grumpyoldman-io
Copy link

grumpyoldman-io commented Feb 11, 2019

Describe the bug
After installing a clean build of storybook html (following the instructions) and running yarn build-storybook a broken static build is rendered. The parent keeps opening an iframe inside an iframe inside an iframe and so on.

To Reproduce
Steps to reproduce the behavior:

  1. npx -p @storybook/cli sb init -t html
  2. yarn build-storybook
  3. use serve or any other hosting option serve -s storybook-static
  4. go to the local environment (default is localhost:5000)
  5. enjoy the endless loading of iframes!

Expected behavior
I expect to see the same interface as I see when using the regular yarn storybook command.

System:

  • OS: MacOS
  • Device: Macbook Pro 2015
  • Browser: Firefox Dev Edition, Chrome and Safari respond the same
  • Framework: html
  • Addons: none, default install
  • Version: 4.1.11

Additional context
This is done in a default environment, without changes to the config.

SOLUTION

I think it has to do with "beautifying urls", which transform iframe.html to iframe which in turn just loads the default index.html file creating a loop. Make sure you either don't beautify URL's, or use a hosting solution that does not do this. The problem (as far as I can tell) is not within Storybook.

@tmeasday
Copy link
Member

Seems like a repeat of #5269

@tmeasday
Copy link
Member

I think perhaps you need to cd into the directory and run serve?

@grumpyoldman-io
Copy link
Author

@tmeasday I've tried, I also uploaded the complete output folder to a webserver (just to make sure its not just my machine). It keeps persisting. It is indeed a duplicate of #5269 but that was closed.

@grumpyoldman-io
Copy link
Author

I just now did a deploy on Netlify and there it does work. My guess it is related to translating iframe.html to iframe (which loads the default index.html). I don't think Storybook can do anything about this since it is up to the serve(r) configuration.

Do you want me to add something to the FAQ in a PR? If not, let's close this.

@efmr
Copy link

efmr commented Jun 19, 2019

Fix: #5269 (comment)

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

No branches or pull requests

3 participants