Storybook: When running storybook in static model - main page nested inside itself

Created on 2 Apr 2019  路  7Comments  路  Source: storybookjs/storybook

Describe the bug
When I just run storybook, it runs just fine:
start-storybook -s public -p 9009

When I build storybook as a static app:
build-storybook -s public
serve -s storybook-static -p 4000

I get no errors, it works - but each entry is nested inside itself. (See attached image.)

To Reproduce
Steps to reproduce the behavior:
(See above)

Expected behavior
build-storybook works the same as start-storybook

Screenshots
Screen Shot 2019-04-02 at 1 04 03 PM

Code snippets
N/A

System:

  • OS: [e.g. iOS, Windows10, MacOS]
    MacOS
  • Device: [e.g. iPhoneX, Macbook Pro 2018]
    Macbook Pro 2018
  • Browser: [e.g. chrome, safari]
    Chrome
  • Framework: [e.g. react, vue, angular]
    CRA 2.1.8 - React, Material-UI 3.9.2
  • Addons: [if relevant]
  • Version: [e.g. 4.0.0]
    3.x, 4.x, 5.0.6

Additional context
Any ideas?

question / support

Most helpful comment

For my npm script command to run the storybook server I had:

"storybook-serve": "serve -s storybook-static -p 4000"

The "-s" arg got accidentally copied over from the "-s" option to specify the public folder for "build-storybook -s public"

The "-s" option for serve is "Rewrite all not-found requests to index.html"

Hence the "inception"...

All 7 comments

I'm an idiot

Inception! What was the fix?

For my npm script command to run the storybook server I had:

"storybook-serve": "serve -s storybook-static -p 4000"

The "-s" arg got accidentally copied over from the "-s" option to specify the public folder for "build-storybook -s public"

The "-s" option for serve is "Rewrite all not-found requests to index.html"

Hence the "inception"...

One of the cooler bugs I've seen 馃憣

@shilman I'm getting this same bug for vue storybook. It works fine in dev mode. But production build just mirrors iteself with no contents.

Any fix?

@palerdot This was a user bug AFAIK, not a problem with Storybook per se.

@shilman Yes. serve -s is for some reason showing nested storybooks. Not an issue with storybook.

Was this page helpful?
0 / 5 - 0 ratings