-
Hey everyone so my team and I are really enjoying using the v6 beta, however we came across a small bug. We formatted our code as close as possible to the expo template example given in the read me, however when we run 'yarn start' we get several import errors Example: Unable to resolve module @storybook/addon-essentials/register from C:\Users\Seth\Desktop\Coding\Visual Studio Projects\Maet\expo-template.storybook\storybook.requires.js: @storybook/addon-essentials/register could not be found within the project or in these directories: This is not the case when we run 'yarn storybook' we can also confirm that the other added extensions work using 'yarn storybook'. To get around this whenever we run 'yarn start' we commend out all the addons in the .storybook/main.js file. We believe this just has to do with using addons not supported by storybook-react-native(I noticed there were only 4 supported). For the time being, we are fine using this workaround, however, we were wondering when more might come out? Down below is our repo if you want to see what addons we are using. Another important thing to note is that in our package.json we have an env variable that either runs out App or storybook(yarn start runs our app, yarn storybook runs storybook) You can see this in our App.ts file. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
@SethY8s Hey thanks for checking out the beta and for asking this question. '@storybook/addon-essentials' is a set of addons for the web, they aren't intended for use on react-native storybook. All react native packages are like storybook/addon-ondevice-x-x. However I think the problem is that you are trying to share config between the web and ondevice version, that currently won't work since you must specify different addons for both versions. Thats becayse web addons are not compatible with react native directly, instead its necessary to rewrite any UI so that it can be rendered on a mobile device (i.e with RN). If you look at my examples they come with an Regarding adding more addon's thats something I could do maybe after v6 stable or for the community can also contribute. |
Beta Was this translation helpful? Give feedback.
@SethY8s Hey thanks for checking out the beta and for asking this question.
'@storybook/addon-essentials' is a set of addons for the web, they aren't intended for use on react-native storybook. All react native packages are like storybook/addon-ondevice-x-x.
However I think the problem is that you are trying to share config between the web and ondevice version, that currently won't work since you must specify different addons for both versions.
Thats becayse web addons are not compatible with react native directly, instead its necessary to rewrite any UI so that it can be rendered on a mobile device (i.e with RN).
If you look at my examples they come with an
.ondevice
folder and thats wha…