User blog:Taldin/A Lot of Re-installation Work Just To Fix A Tiny Bug

Techie Tuesday post on updating your Github repositories.

It's been awhile since I last programmed anything in Habitica, so that means I'm a little behind the times....

A lot of the instructions over on the Setting up Habitica Locally expect you to have never installed Habitica before, but then you have coders like me who have older versions but aren't actively coding. So this is a quick update on updating your codebase.

The picture shown is from my local forked copy of Habitica -- in this case, it's https://github.com/taldin/habitrpg. Because you're always working with a forked copy (or you SHOULD be, anyway....) there are other developers making changes to the codebase while you're off doing other things. Accordingly, whenever you get out of sync, you have to account for everyone else's changes at some point, by updating your own version.

Since I vaguely remember seeing a directive to 'get rid of your old version of Habitica and install a fresh one, I went into Github, deleted my old version and cloned a new one off of the code base in HabitRPG/habitica. The problem is that it kept my old fork on Github, even though I had a new copy on my local machine with all the latest stuff in it. The solution is still to go through the instructions from Step 5 on: git remote add upstream https://github.com/HabitRPG/habitica.git origin  https://github.com/YourUsername/habitica.git (fetch) origin  https://github.com/YourUsername/habitica.git (push) upstream https://github.com/HabitRPG/habitica.git (fetch) upstream https://github.com/HabitRPG/habitica.git (push) ...but then I need to sync up using the instructions from the Using Habitica Git bit: git checkout develop git fetch upstream git rebase upstream/develop git push # to update your fork in GitHub
 * 1) Configure Git to sync your fork with Habitica's repository.
 * 1) Verify that everything is set up properly by typing git remote -v which should produce output the same as the following but with your GitHub username in place:

Not done yet, though. I'll still need to update Node and npm, because mine are at Node 4.0 and npm 2.1. And now it's time for the real fun... seeing how well "npm install"  works these days... well, so far, no errors, but the installers are taking awhile....
 * 1) Grab the latest version of Node from https://nodejs.org/en/downloadand install it.  I had to shut down Git to get the latest version in there.
 * 2) Run "npm install npm@latest -g" to update npm.

Ran into an error with the installer not liking the npm version. Reran and got a different error instead:

Went ahead and kept running commands and got a working copy. However, the whole point was to fix the APIdoc output, which I can't seem to  look at locally...