Skip to content
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

React Native CLI install broken in SB5 (temporarily) #5893

Closed
shilman opened this issue Mar 6, 2019 · 5 comments
Closed

React Native CLI install broken in SB5 (temporarily) #5893

shilman opened this issue Mar 6, 2019 · 5 comments

Comments

@shilman
Copy link
Member

shilman commented Mar 6, 2019

Running the CLI sb init in an RN project installs the wrong version of libraries until we release @storybook/react-native@5.1 which is coming soon.

What's going on

  • CLI is checking for the latest version of dependent libraries on NPM
    • Latest version of @storybook/react-native is 4.x
    • Latest version of the rest of @storybook/* is 5.0.x
  • These versions are incompatible

Workaround

Use the next version of the CLI / React native to get 5.1.0-alpha.x:

npx -p @storybook/cli@next sb init --type react_native

Alternatively, hand edit the version numbers of @storybook/* in package.json after running sb init to match the latest 4.1.x version of @storybook/react-native.

We won't be issuing a fix since we can use that time to release @storybook/react-native@5.1 instead. Will update here as soon as that's live.

@shilman
Copy link
Member Author

shilman commented Mar 6, 2019

Awesome gist from @johnwylie70 with the current install process end to end:

https://gist.github.com/johnwylie70/1f019c643641f56b400acc78415d398d

@shilman
Copy link
Member Author

shilman commented Mar 22, 2019

We’ve released a brand new @storybook/react-native with a bunch of core improvements. It’s available in the latest 5.1-alpha on next and has been verified by several RN users on their existing apps. It should fix a bunch of compatibility issues, especially if you’re using the web server feature. Please give it a try and comment here if it fixes your problem. Migration instructions available here: https://github.com/storybooks/storybook/blob/next/MIGRATION.md#react-native-server

@idanhaviv
Copy link

@shilman upgrade by changing "@storybook/react-native": "5.1-alpha" in package.json?
and what is "next"?

@shilman
Copy link
Member Author

shilman commented May 21, 2019

Next is both a GitHub branch and also an npm tag. We'll be releasing 5.1 in 2wk which will fix this issue

@shilman shilman modified the milestones: 5.1.0, 5.1.x Jun 5, 2019
@shilman
Copy link
Member Author

shilman commented Jun 13, 2019

Fixed with 5.1 release!

@shilman shilman closed this as completed Jun 13, 2019
alechp added a commit to servexyz/react-native-expo-storybook-v5 that referenced this issue Jun 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants