-
I am working on a RN app and the task is implement storybook and visualize components in web and emulators(android/ios). Following the steps in this link: https://levelup.gitconnected.com/introducing-react-native-web-storybook-3c56d48a6508 I have the error Unable to resolve "@storybook/addon-react-native-web/register" from ".storybook/storybook.requires.js" when run storybook in emulator ( displays in the web fine). The package react-native-web is already installed, and yhe package json is: `"scripts": {
`/* do not change this file, it is auto generated by storybook. */ import { global.STORIES = [ import "@storybook/addon-ondevice-controls/register"; import { argsEnhancers } from "@storybook/addon-actions/dist/modern/preset/addArgs"; import { decorators, parameters } from "./preview"; if (decorators) { if (parameters) { try { const getStories = () => { configure(getStories, module, false);` Any help is appreciated,thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
@7SilviaT you can't include addon-react-native-web in the react native addons since its a web specific addon. addon-react-native-web is used on a reactjs storybook to make stories load on the web. |
Beta Was this translation helpful? Give feedback.
-
@dannyhw I'm a bit confused - the readme indicates we should be adding this to the 'addon's property in main.js:: .storybook/main.js
|
Beta Was this translation helpful? Give feedback.
@7SilviaT you can't include addon-react-native-web in the react native addons since its a web specific addon.
addon-react-native-web is used on a reactjs storybook to make stories load on the web.