storybookjs / react-native

📓 Storybook for React Native!
https://storybook.js.org
MIT License
1.07k stars 155 forks source link

if executing 'sb-rn-get-stories', cause error in @storybook/core-common #465

Closed sunjungAn closed 1 year ago

sunjungAn commented 1 year ago

Describe the bug i did setup storybook in React Native. but i can't execute 'storybook-generate'. i writed scripts in package.json..

    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "lint": "eslint .",
    "start": "react-native start",
    "test": "jest",
    "storybook-generate": "sb-rn-get-stories",
    "storybook-watch": "sb-rn-watcher"

when i execute 'npm run storybook-generate' in terminal, cause error.

node_modules/@storybook/core-common/dist/cjs/utils/normalize-stories.js:137
  return entries.map(function (entry) {
                 ^
TypeError: Cannot read properties of undefined (reading 'map')

how can i resolve this problem?

dannyhw commented 1 year ago

@sunjungAn Can you provide some more information about your setup? For example what version of all the storybook packages and your main.js and preview.js config

dannyhw commented 1 year ago

closing due to no response, if you're still having this issue please provide more information and I can re-open the issue.