What is the meaning of 'No bundle URL present' in react-native?

前端 未结 30 2321
庸人自扰
庸人自扰 2020-11-30 17:22

When I run a react-native project, I get a error no bundle URL present , but I don\'t know what mistakes I do, I was very confused.

30条回答
  •  独厮守ぢ
    2020-11-30 17:45

    Assuming that you are using nvm and multiple versions of node installed, here is the solution:

    1. Say that you run npm install -g react-native-cli in node v6.9.5.
    2. Now make node v6.9.5 as default by running nvm alias default 6.9.5
    3. Now run react-native run-ios

    The problem is, you have multiple versions of node installed via nvm and to install react-native-cli you have switched or installed latest version of node, which is not marked as default node to point in nvm yet. When you run react-native run-ios this opens up another new terminal window in which default nvm is not pointed to the node version where you have installed react-native-cli. Just follow the above setup, I hope that should help.

提交回复
热议问题