[英]Path error when running react-native project on my macbook
It is a path error, but I never modify file. 这是路径错误,但我从不修改文件。
The file exists. 该文件存在。 My project path is
'../test'.
我的项目路径是
'../test'.
test folder is my project root dir.
测试文件夹是我的项目
root dir.
but the err msg tell me the root is 'test/node_modules/react-native/packager';
但是err msg告诉我根目录是
'test/node_modules/react-native/packager';
, It is wrong. , 这是错误的。
I think the project config is wrong, but I don't know how to modify config. 我认为项目配置错误,但我不知道如何修改配置。
The issue is that you don't have a index.ios.js file, so it can't run the thing. 问题是您没有index.ios.js文件,因此无法运行该文件。 You would have the same issue if you ran a Android simulator and didn't have index.android.js.
如果您运行Android模拟器并且没有index.android.js,则会遇到相同的问题。 If your react app is in the App.js file:
如果您的react应用位于App.js文件中:
cp App.js index.ios.js
in your react project folder. 在您的反应项目文件夹中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.