-
-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
"Can't find variable: document" React Native error (3.3.0-alpha.2) #2096
Comments
Help highly appreciated! Somehow react-native bundler is bundling glamorous and some React styled components inside the react-native bundle. I can't pin where this is happening because I'm not too familiar with the rn cli tools. If anyone has time, I'd love some help. |
Had a look at this with @danielduan's help. The issue comes from this line: https://github.com/storybooks/storybook/blob/release/3.3/addons/links/src/index.js#L8 The problem is that |
I'm not sure what the best solution is but it probably involves separating the "UI" exports from |
Ok, so I can remove the reexport, and add a deprecation placeholder in case someone used it, right? |
Probably -- perhaps it should be exported by |
maybe even |
That's technically accurate but maybe a little confusing as you may want to use the export within an addon which can work with any framework (but in the react-based manager UI of course). What do you think? OTOH we would only want react users to use it. So maybe |
(updated my comment above with the opposite opinion ;) ) |
This component is rendered in preview not manager, so it's usable only in storybook for React |
Oh, right. Even moreso then :) |
verified fixed with PR ^ |
`// @flow import type {ScreenProps } from "../components/Types"; import variables from "../../native-base-theme/variables/commonColor"; export default class Contact extends React.Component<ScreenProps<>> {
} const style = StyleSheet.create({ |
This is a problem again due to |
can u explain in detailed? |
Hello,
I am trying to get 3.3 up & running so that I can have accessibility labels (#1780) for Detox testing. Everything installs fine, but when I start up the app, I get a RSOD on
Can't find variable: document
.The
sheet.js
in the trace is inside of theglamor
package. That particular line looks like:isBrowser
looks like:(https://github.com/threepointone/glamor/blob/master/src/sheet.js)
Maybe there is a
global.window
defined in Storybook 3.3 that wasn't there in 3.2?P.S. I realize this is alpha release, but I figured I'd report it sooner rather than later if it is legit. Also, my setup is a tad bit complicated — I'm using
react-native-storybook-loader
— so I tried to create a vanilla CRNA/Storybook repo for you, but I couldn't get past #1943.Edit: Additional info
React Native: 0.47.2
Some
npm ls
output:The text was updated successfully, but these errors were encountered: