How can I regenerate ios folder in React Native project?

后端 未结 13 623
忘掉有多难
忘掉有多难 2020-11-29 20:13

So a while ago I deleted the /ios directory in my react native app (let\'s call it X). I\'ve been developing and testing using the android emulator but now I\'d like to make

相关标签:
13条回答
  • 2020-11-29 21:04

    Since react-native eject is depreciated in 60.3 and I was getting diff errors trying to upgrade form 60.1 to 60.3 regenerating the android folder was not working.

    I had to

    rm -R node_modules
    

    Then update react-native in package.json to 59.1 (remove package-lock.json)

    Run

    npm install
    
    react-native eject
    

    This will regenerate your android and ios folders Finally upgrade back to 60.3

    react-native upgrade
    

    react-native upgrade while back and 59.1 did not regenerate my android folder so the eject was necessary.

    0 讨论(0)
提交回复
热议问题