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. However when I run npm start I get the following error:
[email protected] start /Users/chiMarvine/Projects/react-native
./packager/packager.sh || true/Users/chiMarvine/Projects/react-native/packager/packager.js:233
const dumpName = '/tmp/dump_' + Date.now() + '.json';
^^^^^
SyntaxError: Use of const in strict mode.
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3
I have no idea on how to go about this issue, the build succeeds but the simulator says the following:
Ensure the following:
-Node server is running and available on the same network - run
'npm start' from react-native root
- Node server URL is correctly set in AppDelegate
URL: http://localhost:8081?examples/UIExplorer/UIExplorerApp.ios.bundle?platform=ios&dev=true
The request has timed out
Some help would be great, thanks!
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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With