React Native App crashes on Launch Screen on device

前端 未结 6 1942
轮回少年
轮回少年 2021-02-05 12:50

I\'m starting with React Native, everything works fine in the iOS simulator. I decide to try it on a device.

The app launches, I can play with it, I close/reopen it arou

6条回答
  •  粉色の甜心
    2021-02-05 13:37

    I came across this issue today. Read a few SO posts and saw one guy mentioned if your app launches and hangs on the splash screen and then crashes with no error it probably has something to one of your npm dependencies.

    After digging deeper i saw the react packager was throwing the error

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

    To fix

    1. check / clean up dependencies(check for same name declerations)

    2. rm -rf node_modules

    3. rm -rf $TMPDIR/react-*

    4. npm i

提交回复
热议问题