react-native: Starting Storybook errors out
Describe the bug Storybook after initiation doesnt have the storybook.requires file and the index.js file errors out. It was initiated using : npx sb@next init --type react_native
To Reproduce Steps to reproduce the behavior:
- npx sb@next init --type react_native
- Start storybook
Expected behavior Storybook to start without errors
Screenshots
Code snippets index.js file :
import { getStorybookUI } from "@storybook/react-native";
import './storybook.requires';
const StorybookUIRoot = getStorybookUI({});
export default StorybookUIRoot;
System:
Please paste the results of npx -p @storybook/cli@next sb info here.
Environment Info:
System: OS: Linux 5.15 CPU: (4) x64 Intel® Core™ i3-4005U CPU @ 1.70GHz Binaries: Node: 16.13.2 - ~/.nvm/versions/node/v16.13.2/bin/node Yarn: 1.22.15 - ~/.nvm/versions/node/v16.13.2/bin/yarn npm: 8.5.3 - ~/.nvm/versions/node/v16.13.2/bin/npm Browsers: Chrome: 110.0.5481.100 npmPackages: @storybook/addon-actions: ^6.5.16 => 6.5.16 @storybook/addon-controls: ^6.5.16 => 6.5.16 @storybook/addon-ondevice-actions: ^6.5.3 => 6.5.3 @storybook/addon-ondevice-controls: ^6.5.3 => 6.5.3 @storybook/react-native: ^6.5.3 => 6.5.3
Additional context Add any other context about the problem here.
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 1
- Comments: 53 (28 by maintainers)
It should be in your default export like
component:Buttonok. Everythings fine. Thanks.