“Invariant Violation: Application AwesomeProject has not been registered” When building for iOS device with static jsbundle

后端 未结 14 2331
刺人心
刺人心 2020-12-08 18:20

First off, I don\'t know react, but I figured deploying to an iOS device instead of the simulator wouldn\'t be too difficult to do with the docs. They were a bit sparse but

14条回答
  •  旧巷少年郎
    2020-12-08 18:47

    I am not fan of closing down everything so I dig this further.

    All I had to do is in my terminal window, I ran this command:

    ../lala/node_modules/react-native/packager/launchPackager.command ; exit; 
    

    My project name was "lala" , so find that there is node_modules in your project too.

    replace lala with your project name it should work.

    If there is an error says port is already in use:

     ERROR  Packager can't listen on port 8081
    

    Then you have two choices:

    • Kill already running program.
    • Or Change the port by going into : ../lala/node_modules/react-native/packager/packager.js then find your port number, example 8081, and replace with the port number that is not in use.
     var options = parseCommandLine([{
              command: 'port',
              default: 8082,
            }, {
    

    Save this file and then run the above command again.

    This way I can run multiple react(ors).

提交回复
热议问题