Nat*_*Tew 5 react-native expo expo-go
npx expo start我正在尝试与我的“纯”react-native 项目一起使用(即我使用 React Native 的 CLI 创建了该项目)
当我运行时npx expo start,我收到此错误:
iOS Bundling complete 36518ms
ERROR Invariant Violation: "main" has not been registered. This can happen if:
* Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
* A module failed to load due to an error and `AppRegistry.registerComponent` wasn't called., js engine: hermes
Run Code Online (Sandbox Code Playgroud)
在这个stackoverflow 线程之后,我确保我的应用程序名称是和中的“sotravelapp” package.json,它从 导入名称。奇怪的是错误消息显示“main”而不是“sotravelapp”。AppDelegate.mmindex.jsapp.json
所以我尝试将这三个文件中的名称更改为“main”,这使其工作。
所以看起来这个名字被固定为“main”。这似乎就是这个博览会文档所说的。如何将其更改为我想要的名称?
| 归档时间: |
|
| 查看次数: |
803 次 |
| 最近记录: |