React Native App crashes on startup screen on device

I start with React Native, everything works fine in an iOS simulator. I decided to try it on the device.

The application starts, I can play with it, I close it / open it about 4 or 5 times, and then accidentally deletes the application on the launch screen (the one that has "Powered By React Native"). It just shows the screen, and the application crashes to the main screen of the iPhone.

Any idea how I can debug this?

Edit: I added Bugsnag to my AppDelegate.m, but bugsnag doesn't detect anything when the application crashes.

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  NSURL *jsCodeLocation;

  [BugsnagReactNative start];

  // Rest of code  

}
+6
source share
2 answers

. SO , , , , , - npm.

,

This error is caused by a @providesModule declaration with the same name across two different files.

  • / ( )

  • rm -rf node_modules

  • rm -rf $TMPDIR/react-*

  • npm i

+3

, , .

, . , .

node , . , : react-native run-ios,

ios/build

I rm -rf ios/build/, react-native run-ios ios/build. .

0

Source: https://habr.com/ru/post/1016054/


All Articles