3

When I launch my project I am getting a ReferenceError: Can't find variable: __DEV__ error. I have commented out almost all of my code and now only have this

import React, {
    Component,
    Text
} from "react-native";

var {
    AppRegistry
} = React;

class Root extends Component {
    render() {
        return (
            <Text>App</Text>
        );
    }
}

AppRegistry.registerComponent("App", () => Root);

I have tried wiping out my node_modules folder and doing a clean build from Xcode. The packager console output doesn't show any problems and the Xcode Console is blank. At this point I don't know what else to try.

enter image description here

respectTheCode
  • 42,348
  • 18
  • 73
  • 86

1 Answers1

1

The problem was having "strict" in my .babelrc file. It appears that react-native is assigning __DEV__ without declaring it.

https://github.com/facebook/react-native/issues/3605

respectTheCode
  • 42,348
  • 18
  • 73
  • 86