dpcunningham / process-spinup-devenv-ionic4-ng-on-linux

Process: Spin Up a Development Environment for Ionic 4 (default Angular) Apps
0 stars 0 forks source link

upgrade: Node.js (and npm) to their latest versions #6

Open dpcunningham opened 4 years ago

dpcunningham commented 4 years ago

The latest version is typically listed at the Node.js site download page

Per guidance from the following resources:

Applied a mix of these, along these lines:

 1983  node -v
 1984  npm -v
 1985  npm install npm@latest -g 
 1986  sudo npm install npm@latest -g 
 1987  npm install -g  npm
 1988  sudo npm install -g  npm
 1989  npm -v
 1990  sudo npm cache clean -f
 1991  sudo npm install -g n<
 1992  sudo npm install -g n
 1993  sudo n stable
 1994  node -v
 1995  npm -v

NB: After this, I had to do a lot of monkeying around with my $PATH, because the old path to the 10.x version was still in effect, even though the 12.x version had been installed.

I found my .profile was pre-pending the path to the old version of node onto my path, so I had to go and make some edits to my .profile. And even after this, I could not just $source .profile, because the prepend operation would just... pre-pend again, so the problematic $PATH was still... problematic. Also, firing up another terminal shell wasn't sufficient either, as the problematic $PATH was still propagating. Uggh.

I'm not here to do an entire rewrite of my .bashrc and .profile, so I just opted to logout (completely, as end the entire desktop session)