React-发生最小的异常 [英] React - Minified exception occurred
本文介绍了React-发生最小的异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我通过NPM安装了React js,并使用browserify来管理react中的组件。当React中发生异常时,控制台显示为
I have React js installed via NPM and using browserify to manage components in react. When an exception occurs in React, the console shows as
未捕获的错误:发生了最小化的异常;请使用非最小化的dev
环境中显示完整的错误消息和其他有用的
警告。
"Uncaught Error: Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."
如何启用完整的错误消息?
How do I enable full error messages ?
推荐答案
正如本杰明·格伦鲍姆(Benjamin Gruenbaum)在评论中指出的那样,将NODE_ENV设置为开发状态即可解决问题。
Setting NODE_ENV to development as Benjamin Gruenbaum pointed out in the comment resolved the issues.
set NODE_ENV=development
这篇关于React-发生最小的异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文