facebook / react-native

A framework for building native applications using React
https://reactnative.dev
MIT License
118.37k stars 24.25k forks source link

Could not find source file at /Examples #2359

Closed grantpowell closed 9 years ago

grantpowell commented 9 years ago

XCode cannot run UIExplorer examples. Saying there is a missing file. Here is the exact message:

Could not find source file at Examples/UIExplorer/UIExplorerApp.ios.js

screen shot 2015-08-17 at 8 43 58 am

grantpowell commented 9 years ago

Terminal error details:

{ [NotFoundError: Could not find source file at Examples/UIExplorer/UIExplorerApp.ios.js] message: 'Could not find source file at Examples/UIExplorer/UIExplorerApp.ios.js', name: 'NotFoundError', type: 'NotFoundError', status: 404, errors: [ { description: undefined, filename: undefined, lineNumber: undefined } ] } [08:43:46] request:/Examples/UIExplorer/UIExplorerApp.ios.includeRequire.runModule.bundle?dev=true ::1 - - [Mon, 17 Aug 2015 12:50:24 GMT] "GET / HTTP/1.1" 404 - "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.155 Safari/537.36" [08:50:40] request:/index.ios.bundle [08:50:40] request:/index.ios.bundle (12ms)

geirman commented 9 years ago

which version are you using? did you try npm install in the Examples/UIExplorer/ directory?

robtg4 commented 9 years ago

Same issue here

screen shot 2015-09-03 at 3 23 21 am

daniel commented 9 years ago

I have the same issue with all examples. Running npm install didn't help.

aj9045 commented 9 years ago

I have the same issue with the same error. I've tried npm install in Examples/UIExplorer, but it didn't help.

robtg4 commented 9 years ago

@daniel @aj9045 @grantpowell I had to shut down xcode and restart my computer then it ran fine - odd though

JasonZ321 commented 9 years ago

same issue happened when trying to run Movies

daniel commented 9 years ago

@robtg4 Thanks, that solved my problem too! It was maybe the React Packager that had to be restarted.

daniel commented 9 years ago

Now I had to same problem with the Movies example.

screen shot 2015-09-07 at 12 48 45

Restarting Xcode or React Packager didn't help. All other examples I tried, UIExplorer and 2048 worked though.

I noted that it searched for "MoviesApp.js", but the file is called "MoviesApp.ios.js", so I tried renaming the file to "MoviesApp.js" and that fixed the problem. I have managed to start the Movies example before without renaming the file before though.

brentvatne commented 9 years ago

I just confirmed that this is currently working on master, so if this was an issue it has been fixed :v:

If it persists for you on master, make sure you're running npm start from the root react-native directory, not from /Examples/* :smile: