React Storybook blank page when run

Viewed 4867

I am trying to load the demo storybook stories. I created a react app using create-react-app and run npm start. It starts on port: 3000. Then when I run npm run storybook, it opens a browser on port:6006. But displays a blank page only.

6 Answers

What helped me was to run

rm yarn.lock
yarn install

after installing storybook into my project

If you wanna stay on react version 17 then you could upgrade storybook to prelease by doing

npx sb@next upgrade --prerelease

for additional information please refer GitHub issue #12408

Try to clear your browser cache. It resolved my issue.

npm ci saved the day for me and fixed the issue

My problem was because I updated @storybook/preset-create-react-app too and it seems I shouldn't have.

When @storybook/preset-create-react-app was reverted back to initial version 3.2.0 in my case, and @storybook/react updated to latest ^6.5.4 - everything was fine.

Related