-
-
Notifications
You must be signed in to change notification settings - Fork 9.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CLI: Fix addons register in RN template #18693
Conversation
Fix Module not found: Can't resolve '@storybook/addon-ondevice-actions/manager' error after installing storybook on react native expo app (npx -p @storybook/cli sb init --type react_native) Closes storybookjs#18692
☁️ Nx Cloud ReportWe didn't find any information for the current pull request with the commit 4c944f7. Check the Nx Cloud Github Integration documentation for more information. Sent with 💌 from NxCloud. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Sorry about that!
Hey @shilman, can we get this cherry picked to the latest cli version? 🙏 |
Absolutely. Next few days |
awesome! thanks :) |
CLI: Fix addons register in RN template
Issue: #18692
Fix Module not found: Can't resolve '@storybook/addon-ondevice-actions/manager' error after installing storybook on react native expo app (npx -p @storybook/cli sb init --type react_native)
Issue:
Getting module not found error when trying to run storybook in react native expo app
What I did
Changed these two imports to point to /register instead of /manager:
import '@storybook/addon-ondevice-actions/manager';
import '@storybook/addon-ondevice-knobs/manager';
How to test
Follow the steps depicted in Storybook get started:
expo init --template tabs@sdk-36 taskbox
(Create new empty expo project)cd taskbox
npx -p @storybook/cli sb init --type react_native
(Add storybook support)export {default} from './storybook';
(Export default from entrypoint of your app)After setting up the project if you try to run storybook it will not crash as before
If your answer is yes to any of these, please make sure to include it in your PR.