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.
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
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.
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.