storybookjs / react-native

📓 Storybook for React Native!
https://storybook.js.org
MIT License
996 stars 141 forks source link

[Bug]: Error: Unable to resolve module @storybook/core-events/preview-errors #510

Closed Mazztwo closed 10 months ago

Mazztwo commented 10 months ago

Getting this error when trying to run storybook react native:

Error: Unable to resolve module @storybook/core-events/preview-errors

@storybook/core-events/preview-errors could not be found within the project or in these directories: node_modules/@storybook/preview-api/node_modules node_modules ../node_modules 4 | Previous: ${hook.deps}

This was not happening a few days ago.

Dependencies: "@storybook/addon-actions": "^7.4.0", "@storybook/addon-knobs": "^7.0.2", "@storybook/addon-links": "^7.4.0", "@storybook/addon-ondevice-actions": "^6.5.6", "@storybook/addon-ondevice-knobs": "^6.5.6", "@storybook/addons": "^7.4.0", "@storybook/api": "^7.4.0", "@storybook/core-events": "^7.4.0", "@storybook/preview-api": "^7.4.0", "@storybook/react-native": "^6.5.6", "react": "18.2.0", "react-native": "0.72.4",

dannyhw commented 10 months ago

@Mazztwo react native storybook is not yet compatible with version 7 you must lower those to ~6.5.

It's not feasible for two major versions to be compatible since major versions contain breaking changes.

Mazztwo commented 10 months ago

Downgraded everything to around 6.X, and worked like a charm. Thanks mate!