ReferenceError: Cannot find variable: __DEV__

When I start my project, I get a ReferenceError: Can't find variable: __DEV__ . I commented on almost all of my code and now only 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 tried destroying my node_modules folder and doing a clean build from Xcode. The output from the packer console does not cause any problems, and the Xcode console is empty. At the moment, I do not know what else to try.

enter image description here

+2
react-native
source share
1 answer

The problem was "strict" in my .babelrc file. It seems that response-native assigns __DEV__ without declaring it.

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

+1
source share

All Articles