I've understood that I'm using react.js version 15.6.2. I know this because doing this in my code:
console.log(React.version);
results in this console output:
15.6.2
I want to upgrade to React@^v16.2.0. I tried doing this:
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
sudo n latest
But nothing changes. I get the same version output in the console. How do I upgrade node?
EDIT:
Here's the situation, I'm in a project folder with the following hierarchy:
node_modules seems to contain the react installation, since it has a react folder with a package.json file containing the version number 15.6.2.
I've tried both npm update --save react and npm update -g react. None worked. Same thing happens, and the same version number can be found in node_modules/react/package.json. I even tried to run npm install again before hosting with npm start. Any other suggestions?
