-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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: "Can't find variable: document" #4063
Comments
did you find any solution for this? |
@ritz078 nope, I gave up... |
I don't have a fix for this yet but what I've seen so far @storybook/react-native/dist/index.js |
Does it happen without any addons as well? |
Hey. It happens always: Addons/index.js import { TabWrapper } from '@storybook/components'; This line brings many things that are not relevant to RN and is part of global import. In first place no ui should be inside @storybook/addons at all |
So, do we have a bug? |
Yes :) |
🤦♂️ I think we need to add some test that will prevent this kind of bugs. |
Simple sanity test would help a lot here. We could try to add detox tests in the future for React Native. |
I am fixing this. |
…just turn off the webserver
@igor-dv @Gongreg and i talked a bit about this, we think the best method to fix this is by moving this code to https://github.com/storybooks/storybook/blob/master/lib/addons/src/index.js#L56-L62 |
Hello, 4.0.0-alpha.20 was released. It should solve this issue. |
I'm seeing this error in edit: Nevermind, my fault, same as #4642 |
Bug
Getting "Can't find variable: document" error when launching React-Native app with storybook.
Steps to reproduce
react-native init TestStoryBookReactNative
npm i -g @storybook/[email protected]
cd TestStoryBookReactNative
andgetstorybook
npm run storybook
yarn remove babel-core
andyarn add -D @babel/[email protected] [email protected]
npm run storybook
no more errorreact-native run-ios
Please specify which version of Storybook and optionally any affected addons that you're running
my
package.json
:The text was updated successfully, but these errors were encountered: