I have come across ReactJS and React Native. ReactJS is brilliant, super fast and works fine on Node v0.10. But, React Native needs v4.x as a prerequisite. So, when I run any react-native command, it fails and says Node 4 is required.
I have tried several times and many ways to update Node, but, have failed.
First followed Installation Instructions -
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash
sudo apt-get install -y nodejs
I ended up with the following message-
root@purvotara:/# apt-get install -y nodejs
Reading package lists... Done
Building dependency tree
Reading state information... Done
nodejs is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Then, there was Manual Installation way of installing.
add-apt-repository -y -r ppa:chris-lea/node.js
rm -f /etc/apt/sources.list.d/chris-lea-node_js-*.list
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
echo 'deb https://deb.nodesource.com/node/dists/trusty/Release main' > /etc/apt/sources.list.d/nodesource.list
echo 'deb-src https://deb.nodesource.com/node/dists/trusty/Release main' > /etc/apt/sources.list.d/nodesource.list
apt-get update
apt-get install nodejs
Still, ended up with -
nodejs is already the newest version.
I tried to purge and auto-remove my current v0.10 node and tried to freshly install, not sure if its still picking the install from the cache, but, v0.10 got installed.
Also followed linoxide article on the same. A .configure and make install didn't seem to work as well.
What am I doing wrong? I am stuck for hours.
Went over several other links to resolve other issues(they are resolved now)-