Describe the bug
Installation with npx -p @storybook/cli sb init does three weird things:
"WARNING: We noticed you're using the useBuiltIns option without declaring a core-js version".
Not a big deal I guess, but concerning.
"Please choose a version of "@storybook/react-native" from this list:"
I've chosen the latest 5.1.0-alpha.13. After installation, this end up installed and in my package.json:
"@storybook/react-native": "^5.0.5",
"@storybook/addon-actions": "^5.0.5",
"@storybook/addon-links": "^5.0.5",
"@storybook/addons": "^5.0.5",
Not what I selected.
yarn run storybook or npm run storybook, all I get is:/bin/sh: storybook: command not found
Indeed there is no storybook binary in /node_modules/.bin/
To Reproduce
Run react-native init test
cd test
npx -p @storybook/cli sb init
npm run storybook
Expected behavior
To start storybook without any issues
System:
Thanks for looking into this
To clarify, I'm getting the same error (command not found) even when I install specifically "@storybook/react-native": "^5.1.0-alpha.13"
@EskelCz This is related to https://github.com/storybooks/storybook/issues/5893
What happens when you run npx -p @storybook/cli@next sb init so that it gets the alpha versions of the libraries?
The core-js issue is separate, and related to the recent release of core-js@3. We should fix it, but AFAIK it's just a warning and not actually causing any problems ... yet 馃槃
@shilman Thanks, that installs the right version.
Then it crashes on missing peer dependencies (babel and webpack), which are hard to notice (since they became such a commonplace these days) but after installing those it finally works. :)
Thank you
@shilman I think I've found how to replicate it:
start-storybook seems to start the server ok
storybook start gives the error
(the second is mentioned here: https://storybook.js.org/docs/guides/guide-react-native/)
@EskelCz thanks for following up on this. This changed in 5.1, but the docs page is for the latest stable version. Here's the migration for 5.1:
https://github.com/storybooks/storybook/blob/next/MIGRATION.md#react-native-server
Any suggestions on what we should do about this?
Oh, I missed the last instruction of the migration info. So I guess it's fine, everyone with the same problem will find this thread.
Just update the docs with the new command when it's out of alpha.
Thanks for your patience! :)
I installed storybook with npx -p @storybook/cli sb init today...
as suggested from the the cli, i installed core-js@3, then the start script was not found.
but after installing @storybook/react-native-server and updating storybook script to `start-storybook -p 7111" i solved the problem