I am attempting to start developing my first ever React Native application. I've installed the react-native-cli and ran the command react-native ios-run. The build is successful, and the simulator seems to boot up fine. However, a second terminal appears with the following message:
You are currently running io.js v1.6.2.
React Native runs on Node 4.0 or newer. There are several ways to
upgrade Node.js depending on your preference.
nvm: nvm install node && nvm alias default node
Homebrew: brew unlink iojs; brew install node
Installer: download the Mac .pkg from https://nodejs.org/
About Node.js: https://nodejs.org Follow along at: https://github.com/facebook/react-native/issues/2545
~
Process terminated. Press to close the window
I have tried:
uninstalling and reinstalling node via Homebrew. node -v = 7.3.0
brew unlink iojs Error: No such keg: /usr/local/Cellar/iojs
nvm install node && nvm alias default node doesn't change anything.
navigated to /usr/local/bin and uninstalled iojs iojs -v -bash: iojs: command not found
brew update: no changes to formulae
brew doctor: nothing besides usual warnings
brew prune: nothing
brew cask uninstall iojs Error: iojs is not installed
Help is appreciated here. I am at a loss to understand how I can be running io.js v1.6.2 when I'm pretty certain iojs is not installed on my machine. But perhaps I am missing something...cheers.
Finally got it. Uninstalled all versions of node / deleted any node or node_modules folders from /usr/local/lib/.
Also nvm uninstall iojs --force.
Downloaded node from https://nodejs.org/en/download/. After all that, it worked. I'll leave this here for anyone else who encounters this problem!