react-native UIExplorer won't open

后端 未结 3 1205
有刺的猬
有刺的猬 2021-02-20 03:57

I\'m trying to view the UIExplorer on Xcode. I have followed the example and it should be simple. It says to clone react-native, cd to directory, npm install and run npm start.

相关标签:
3条回答
  • 2021-02-20 04:20

    I had the same issue. My problem was that I installed node 4.2.2 with nvm but did not set it to be the default version. The shell that was running the build process had my default node.js running which was very old. To fix it, I ran:

    nvm alias default 4.2.2

    0 讨论(0)
  • 2021-02-20 04:29

    const is ECMA6 (ES6) javascript syntax. If you have an older version of node without ES6 support you would get this error. Node 4.X versions have ES6 support. Hence upgrading solves the problem.

    0 讨论(0)
  • 2021-02-20 04:30

    I have the same problem a moment ago, and my solution is update the NodeJS version to V4.0.0 , after completing, delete the react-native folder, do the original step again.

    git clone https://github.com/facebook/react-native.git
    
    cd react-native && npm install
    
    npm start
    

    it is working, hope this could help you.

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