使用 Expo XDE 找不到入口文件 index.js [英] Cannot find entry file index.js with Expo XDE
问题描述
当我在 Expo 中加载我的 react-native 应用程序时,我收到错误:无法在任何根目录中找到入口文件 index.js."
When I load my react-native app in Expo I get the error: "Cannot find entry file index.js in any of the roots."
我正在添加到现有的 React Web 应用程序,并在根级别有 index.ios.js.一切都在本地,在模拟器中和通过我的手机硬连线的 Xcode 上运行良好.我已经用 exp convert
转换了我的应用程序,并将所有信息集成到 exp.json
.
I am adding onto an existing React Web App, and have index.ios.js at the root level. Everything works fine locally, in simulator and through Xcode on my phone hardwired. I've converted my app with exp convert
and integrated all info into exp.json
.
ios 应用的所有信息都包含在一个名为ios"的文件夹中.
All info for the ios app is contained in a folder called "ios".
有没有人遇到过这种情况或对如何摆脱困境有任何想法?
Has anyone run into this or have any thoughts on how to get unstuck?
推荐答案
检查你的 package.json 并将 index.js 重命名为你的入口文件.
check you package.json and rename index.js to your entry file.
//...
},
"main": "index.js"
}
这篇关于使用 Expo XDE 找不到入口文件 index.js的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!