Describe the bug
After upgrading react-native from 0.59 to 0.61, in which they introduced fast refresh, there were several issues with Storybook (always loading with addon page opened, and throwing different errors on code change forcing me to reload every time I changed the code). I read that at least the addon always being shown had been resolved, and therefore wanted to update storybook, because it sucked to click and close this and that all the time.
However, after updating I have bigger problems, which forces me to downgrade again:
"Unable to resolve module `rn-host-detect` from `node_modules/@storybook/react-native/dist/preview/index.js`: rn-host-detect could not be found within the project."
To Reproduce
Install storybook v5.3.0-beta.14 and run the app.
Expected behavior
I would expect it to work.
System:
System:
OS: macOS 10.15.1
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Binaries:
Node: 10.16.0 - /usr/local/bin/node
Yarn: 1.19.2 - ~/.yarn/bin/yarn
npm: 6.9.0 - /usr/local/bin/npm
Browsers:
Chrome: 78.0.3904.108
Safari: 13.0.3
npmPackages:
@storybook/addon-storyshots: v5.3.0-beta.14 => 5.3.0-beta.14
@storybook/addons: v5.3.0-beta.14 => 5.3.0-beta.14
@storybook/react-native: v5.3.0-beta.14 => 5.3.0-beta.14
@storybook/react-native-server: v5.3.0-beta.14 => 5.3.0-beta.14
Additional context
If you need any other information, please let me know :)
@jenskuhrjorgensen, are you installing all the same versions for @storybook/* dependencies? rn-host-detect is not used anymore at the moment, so it seems like you are installing older version somewhere.
Hi @Gongreg
Thank you for your answer.
Hmm, interesting. As far as I can see, the only other Storybook related things in my package.json are "@sambego/storybook-state": "1.3.6", and "react-native-storybook-loader": "1.8.0", but I don't think they are installing any @storybook/* dependencies. Amarite?
Would I help debugging it, if I ran some npm command showing all installed dependencies and grepping the ones starting with @storybook/?
Can you install 5.3.0-beta.19 and make sure to use react-native start --reset-cache ?
Awesome, it works! 馃槃 Thanks a bunch
Glad to help :)
Most helpful comment
Can you install 5.3.0-beta.19 and make sure to use
react-native start --reset-cache?