英文:
TypeError: Cannot read property 'displayName' of undefined, js engine: hermes (React Native)
问题
我正在尝试构建一个React Native移动应用程序,但它在完全构建后总是显示下面的错误。我正在使用TypeScript。我正在使用Expo Cli,还使用了React Native版本"react-native": "0.71.6"。如果我点击"dismiss",它将关闭错误并加载应用程序。请帮助!我不知道出了什么问题。这不是我的代码,因为在我开始编写之前,它就显示这个错误,就在我完成设置Eslint和Prettier之后。
英文:
I am trying to build a React native mobile app, but it always presents the below error after which it has been completely built. I'm making use of TypeScript. I'm making use of Expo Cli and also I'm using react native version "react-native": "0.71.6". If I click on dismiss, it will dismiss the error and the app will load. Kindly help! I don't know what's wrong. It's not my code because before I started writing, it was showing this, just immediately I finished setting up Eslint and Prettier
答案1
得分: 4
问题是我遇到了相同的情况。对我来说,问题在于我使用了具名导出(named export)导出我的应用程序。当将其更改为默认导出(default export)时,一切都按照应该的方式运行了。
英文:
I had the same issue. The problem for me was that I exported my App using named export. When changing it into a default export everything worked like it should.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论