React-native运行异常之一一SyntaxError:Strict mode does not allow function declaration in a lexically nested
来源:互联网 发布:安徽联新网络怎么样 编辑:程序博客网 时间:2024/06/11 22:29
在执行React-Native Run-Android(or ios)后,程序跑在设备上,在成功连接pc的情况下,Relode以后,出现红屏,并报以下错误:
SyntaxError:Strict mode does not allow function declaration in a lexically nested statement.
这是FaceBook官方目前的一个bug,待修复。
解决方案:
打开RN项目目录下的InitializeCore.js进行修改,该文件路径为
你的RN项目\node_modules\react-native\Libraries\Core\InitializeCore.js
文件中第112行
修改为
var handleError = function(e, isFatal)
保存后,重新编译运行或者Relode,问题解决。
还有另外一种解决方案是通过修改React-Native的版本(不推荐).
0 0
- React-native运行异常之一一SyntaxError:Strict mode does not allow function declaration in a lexically nested
- SyntaxError:Strict mode does not allow function declaration in a lexically nested statement.
- SyntaxError:Strict mode does not allow function declaration in a lexically nested statement.
- SyntaxError:Strict mode does not allow function declaration in a lexically nested statement.
- rn:strict mode does not allow function declarations in a lexically nested statement
- React-Native Strict mode does not allow ...
- react-native开发:运行react-native run-ios报错--Print: Entry, ":CFBundleIdentifier", Does Not Exist
- react-native 警告之module does not exist in the module map or in these directories
- node.js中遇到SyntaxError: Use of const in strict mode
- node.js中遇到SyntaxError: Use of const in strict mode
- React Native 错误 Module does not exist in the module map
- Composer异常: Your configuration does not allow connection to xx.
- error: function declaration isn’t a prototype [-Werror=strict-prototypes] static int kobject_test_e
- React Native 0.27.2编译报错this._nativeModule.addListener is not a function
- React Native 报错 singleValue.stopTracking is not a function -解决
- error: 'function' in namespace 'std' does not name a template type
- 代码调试:error: multiple types in one declaration error: declaration does not declare anything [-fpermi
- Function.prototype.apply() as to null、undefined in non-strict mode
- 更改githup account用户名教程
- redis集成dao
- 工作流--JBPM流程管理
- 进程相关知识
- HBase数据访问的一些常用方式
- React-native运行异常之一一SyntaxError:Strict mode does not allow function declaration in a lexically nested
- ubuntu安装qemu
- Handler小结
- 查找等式的解
- 3377 数据结构实验之查找五:平方之哈希表
- 入栈顺序
- 数据结构中栈的实现与表现
- CPU、指令集、体系结构以及操作系统
- windows下python3,Theano安装