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.
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.
What helped me was to run
rm yarn.lock
yarn install
after installing storybook into my project
Apparently react has upgraded to version 17.0.0, but storybook hasn't made the switch yet. If you take version 16.14.0 of react it should work.
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
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.