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

start-storybook seems to run, but then displays "Cannot GET /" in the browser #14672

Closed
kaiyoma opened this issue Apr 20, 2021 · 5 comments
Closed

Comments

@kaiyoma
Copy link

kaiyoma commented Apr 20, 2021

Describe the bug
When I run start-storybook, it seems to work correctly, and prints out this message:

╭───────────────────────────────────────────────────╮
│                                                   │
│   Storybook 6.2.8 started                         │
│   1.63 min for preview                            │
│                                                   │
│    Local:            http://localhost:9001/       │
│    On your network:  http://10.95.72.144:9001/    │
│                                                   │
╰───────────────────────────────────────────────────╯

However, when I open that link in the browser, I get only this:

Cannot GET /

System

Environment Info:

  System:
    OS: Windows 10 10.0.19042
    CPU: (4) x64 Intel(R) Core(TM) i7-6600U CPU @ 2.60GHz
  Binaries:
    Node: 14.15.0 - C:\Program Files\Node.js\node.EXE
    Yarn: 1.22.5 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 7.10.0 - C:\Program Files\Node.js\npm.CMD
  Browsers:
    Chrome: 90.0.4430.72
    Edge: Spartan (44.19041.906.0), Chromium (89.0.774.77)
  npmPackages:
    @storybook/addon-actions: 6.2.8 => 6.2.8
    @storybook/addon-docs: 6.2.8 => 6.2.8
    @storybook/addon-knobs: 6.2.8 => 6.2.8
    @storybook/addons: 6.2.8 => 6.2.8
    @storybook/core: 6.2.8 => 6.2.8
    @storybook/react: 6.2.8 => 6.2.8
    @storybook/theming: 6.2.8 => 6.2.8

Additional context
The browser console has only this:

GET http://localhost:9001/ 404 (Not Found)

There's nothing interesting in the Network tab in devtools and start-storybook itself doesn't print out any errors. build-storybook works just fine and I can open that in my browser and all the stories load correctly, so the problem here seems specific to start-storybook.

@kaiyoma
Copy link
Author

kaiyoma commented Apr 20, 2021

Oh also, I should add that when I searched for this problem in the other issues, I found a few semi-related posts that mentioned deleting node_modules and reinstalling packages. I tried that and nothing changed.

@kaiyoma
Copy link
Author

kaiyoma commented Apr 22, 2021

Ah, I figured this out! Leaving a comment here in case some other poor soul runs into this in the future. If you've already tried blowing away node_modules and reinstalling packages, then you may have an issue with your Storybook cache. To fix this, run start-storybook once with the --no-manager-cache flag, and hopefully Storybook will work correctly for you. You only need to use this flag once; after that, the cache should be in a good state. The docs advise against using this flag all the time for performance reasons.

Reference: https://storybook.js.org/docs/react/api/cli-options

@shilman
Copy link
Member

shilman commented Apr 22, 2021

Glad you figured it out! I'm hoping we can do away with the manager caching soon ... it's good for perf but introduces a lot of unfortunate side effects.

@baticodes
Copy link

I had the same issue with v6.3.8, but @kaiyoma saved my day 🤗.

@thayna-oliveira
Copy link

thank you @kaiyoma, you saved my day!! 🤗

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

4 participants