React Native-“您当前正在使用NODE_ENV ==="production"之外的缩小代码. " [英] React Native - "You are currently using minified code outside of NODE_ENV === "production" "
问题描述
我在使用React Native而不是ReactJS时遇到此错误,因此使用webpack或browserify的所有解决方案/解决方案都无济于事.
I'm getting this error with React Native, not ReactJS so all the solutions/workarounds with webpack or browserify wont help.
完整错误:
您当前正在使用NODE_ENV ==="production"之外的缩小代码.这意味着您正在运行较慢的Redux开发版本.您可以使用... bla bla bla(ReactJS的解决方法)
You are currently using minified code outside of NODE_ENV=== "production". This means that you are running a slower development build of Redux. You can use ... bla bla bla ( workarounds for ReactJS )
我当前正在运行此配置:
I'm currently running this config :
"expo": "^23.0.0",
"react": "16.0.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-23.0.0.tar.gz",
"react-redux": "^5.0.6",
"redux": "^3.7.2"
我尝试使用--no-minify
启动服务,而我始终使用--dev
启动它.我也在expo
上运行该应用程序.
I tried starting the service with --no-minify
and I always start it with --dev
. I'm running the app on expo
as well.
如果有人对此有解决方案或解决方法,将不胜感激.
If anyone has a solution or a workaround for this it'd be really appreciated.
推荐答案
如果在使用android虚拟设备时遇到此问题,请打开调试菜单(在Mac上为CMD + M)>开发设置->取消选中JS缩小并重新加载您的应用程序.以下图片供参考.
If you're running into this issue while using an android virtual device, open the debug menu (CMD+M on a Mac) > Dev Settings -> Uncheck JS Minify and reload your app. Pictures included below for reference.
这篇关于React Native-“您当前正在使用NODE_ENV ==="production"之外的缩小代码. "的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!