Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React Native - __DEV__ is not defined

I have a [email protected] project. I have deleted the node_modules folder and after i have given the following commands:

npm i
react-native upgrade

but I get this error:

react-native.js:15 

ReferenceError: __DEV__ is not defined

How do I fix?

like image 417
SaroVin Avatar asked May 27 '16 15:05

SaroVin


2 Answers

Adding

/* global __DEV__ */

To the top of the file worked for me.

like image 99
FishStix Avatar answered Nov 16 '22 01:11

FishStix


Maybe this? https://github.com/facebook/react-native/issues/7814

Removing .babelrc seems to fix the problem.

My .babelrc:

{ "presets": ["react-native"] }

like image 11
Clintm Avatar answered Nov 16 '22 02:11

Clintm