ReferenceError:“BigInt”不存在(Hermes);不变违规:AppRegistry 模块未注册(Hermes)

问题描述 投票:0回答:1

**我正在使用 0.64.1 版本开发 React Native 项目。我尝试升级到版本 0.74.0 但没有成功。因此,我决定恢复到原始版本 0.64.1,并隐藏所有更改。

但是,在存储更改并运行常用命令来启动项目后,我遇到了错误。 ** 错误:

**Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
 ERROR  ReferenceError: Property 'BigInt' doesn't exist, js engine: hermes
 ERROR  Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect.
      This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native., js engine: hermes
 ERROR  Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect.
      This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native., js engine: hermes**

enter image description here

节点:14.15.4 国家PM:2010年14月6日 JDK:11.0.23

为了解决此问题,我尝试了以下步骤:

-删除了项目并克隆了一个新副本,但出现了同样的错误。 -删除了项目和Android Studio,然后克隆了一个新副本,但同样的错误仍然存在。 - 运行各种命令来解决该错误,但没有成功。 -重置我的笔记本电脑并从头开始重新设置所有内容,但我仍然遇到相同的错误。

android react-native upgrade bigint hermes
1个回答
0
投票

由于你已经全局安装了react native,我建议你使用以下方法删除:

  • 运行此命令 npm list -g
  • 转到路径 (C:\Users\用户\AppData\Roaming 下午)
  • 删除所有相关文件 你的包裹
  • 转到node_modules查找并删除包

卸载后,在工作目录中本地安装react-native。使用

npm install react-native@<your_version>
© www.soinside.com 2019 - 2024. All rights reserved.