2017-04-26 19 views
1

我得到这个错误在IOS模拟器:“找不到入口文件中的任何根”问题作出反应导航Redux的例子

cannot find entry file "examples/ReduxExample/index.js" in any of the root. 

并在终端:

Loading dependency graph... 
React packager ready. 

Loading dependency graph, done. 
error: bundling: Error 
    at DependencyGraph._getAbsolutePath (/Users/greg_work/temp/react_native_temp/ReduxExample/node_modules/react-native/packager/src/node-haste/index.js:285:11) 
    at load.then (/Users/greg_work/temp/react_native_temp/ReduxExample/node_modules/react-native/packager/src/node-haste/index.js:228:28) 
    at process._tickCallback (internal/process/next_tick.js:109:7) 
Bundling `examples/ReduxExample/index.js` 0.0% (0/1), failed. 
Launching Dev Tools... 
error: bundling: Error 
    at DependencyGraph._getAbsolutePath (/Users/greg_work/temp/react_native_temp/ReduxExample/node_modules/react-native/packager/src/node-haste/index.js:285:11) 
    at load.then (/Users/greg_work/temp/react_native_temp/ReduxExample/node_modules/react-native/packager/src/node-haste/index.js:228:28) 
    at process._tickCallback (internal/process/next_tick.js:109:7) 
Bundling `examples/ReduxExample/index.js` 0.0% (0/1), failed. 

这当试图在这里运行React Navigation redux示例时:https://github.com/react-community/react-navigation/tree/master/examples/ReduxExample

我基本上是:

  1. 下载的邮政编码为GitHub的项目
  2. 提取的终极版示例文件夹,并跨到另一个区域
  3. 运行抄了一遍“故宫安装”
  4. 反应本地运行-ios

回答

1

你试过这样吗

cd examples/NavigationPlayground or Redux Example 
    npm install 
    cd ../.. 
    npm start 

    # In a seperate terminal tab: 
    npm run run-playground-android 
    # OR: 
    npm run run-playground-ios 
+0

是的 - 我在这里也有一些问题。然而,我发现在这里发布的一个例子,我得到了运行.... https://github.com/react-community/react-navigation/issues/1229 – Greg