Where to Set EXPO_DEBUG value in ReactNative app?

痴心易碎 提交于 2019-12-23 07:26:29

问题


When I try to login in expo I got this error :

[exp] Set EXPO_DEBUG=true in your env to view the stack trace.

Do you know where exactly I have to set the value of EXPO_DEBUG?


回答1:


EXPO_DEBUG is an environment variable, so you can set it by typing export EXPO_DEBUG=true in your shell.




回答2:


Just Simply Put the Following command in Window os in Sequence it will definitely work.

1)Cd Project_Dir>Set EXPO_DEBUG=ture

Then

2)Cd Project_Dir>expo start

Working fine for me.




回答3:


You can do it simple:

$env:EXPO_DEBUG = 'true'

in power shell




回答4:


When you add some library into your project. then this type of problem occurs. This problem also occur for me when i try to add some navigator library into my react native project it happens then...

so if you are in a Linux OS then type in shell export EXPO_DEBUG=true

or if you are in a Windows OS then type in console set EXPO_DEBUG=true

After adding the line in console/Shell i hope project will work again.




回答5:


MY problem was solve by running

npm install

inside current Project directory if it still not work
than update expo to new latest version and restart project again




回答6:


find the following solution according to os

Linux OS then type in shell export EXPO_DEBUG=true

Windows OS then type in console set EXPO_DEBUG=true

Mac os then type in console set EXPO_DEBUG=true




回答7:


This works.

exp start Cancel ctrl c then do exp build:android.




回答8:


This issue arises with the latest version on node which in my case is 12.13.1.

There are suppose to be some changes made in the node_module.

Go to node_module/metro-config/src/defaults/blacklist.js and change your var sharedBlacklist to

var sharedBlacklist = [
/node_modules[\/\\]react[\/\\]dist[\/\\].*/,
/website\/node_modules\/.*/,
/heapCapture\/bundle\.js/,
/.*\/__tests__\/.*/ 
];



回答9:


I deleted node_module and then re run npm install, and it worked




回答10:


just open your command prompt run Set EXPO_DEBUG=ture (not a project directorty) go to project directory run expo start(in a project directory)




回答11:


in mac OS export EXPO_DEBUG=true

or if you are in a Windows OS set EXPO_DEBUG=true




回答12:


in windows use cmd type set EXPO_DEBUG = 'true' then close cmd open again in the project file type expo start if it works graduation :) if not: in project path open node_modules folder and open this path node_module/metro-config/src/defaults/blacklist.js edit the file replace var haredBlacklist ... to this code

var sharedBlacklist = [
/node_modules[\/\\]react[\/\\]dist[\/\\].*/,
/website\/node_modules\/.*/,
/heapCapture\/bundle\.js/,
/.*\/__tests__\/.*/ 
];


来源:https://stackoverflow.com/questions/46947332/where-to-set-expo-debug-value-in-reactnative-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!