1.Install visual studio code (https://code.visualstudio.com/)
2. Install GitHub for windows by doing the following: Go to a GitHub project (could be your own, or some other one) and select to clone the project via “Clone or download”. When you click the button to do so, select to “Open in desktop”. You are then redirected to an install page and click “Download Github Desktop”. Make sure it is for Windows. Now complete that install.
3. Configure the GitHub desktop. You should set it up to know your GitHub account. After that step, click the settings gear in the upper left and select “Options…”. In there, set the “Default Shell” to be “Git Bash”. Click Save. You also now have Git installed on your machine.
4. Download Node.js from https://nodejs.org/en/. Select the LTS version being shown, not the Current. This also installs npm for you.
5. Open GitHub desktop for windows open. Open your browser and go back to the GitHub repo page and click “Clone or download” again. This time it will do something different. When you click the button, select to “Open in desktop”. You will see a popup and select “Open GitHub”. Select the folder or just keep it where it suggests and complete. After that downloads, right click on the project from the left pane and select “Open in Git Shell”. From this prompt you can type “code .” to start visual studio code. You can type “npm install” to to the installation build of the project.
At this point you may be all done and could run and “npm install” and run such as “node myproj.js”.
There are however some npm downloads in projects that require a more complicated build process such as compiling C++ code, so there needs to be the necessary tools installed for that to happen. There is something called node-gyp that is used as the compiler. This requires Python to be installed on your machine and even some Visual Studio build tools. Here are the rest of the steps to go through:
6. Go to https://www.python.org/ and Click Downloads and then for windows click Download Python. You must select a 2.7 version version. I just took the latest one. Run the install and make sure on the bottom of one of the install pages you see where you can select to have Python added to your path. Select to have that on local hard drive.
7. Download Visual Studio 2015 Community Edition (https://www.visualstudio.com/downloads/), choose custom install when it starts up. Select the Visual C++ branch (you can uncheck XP support). Also check Windows SDKs. (See my image). I actually don’t believe all of these are necessary though. BTW, the download can take hours.
Now, you can call me superstitious, but I like to reboot my machine at this time. It just seems to set everything right to go forward from here. Things like your changes to system variables don’t actually take affect until after you log out and back in anyway.
Now you can try and do the npm install again and see it work. Open Git Hub desktop and right click on your repo to open the git bash window and you are good to go. The nice thing now is that if you want to make changes to a project hosted on GitHub you you can manage all of that, either completely from Visual Studio Code, or in combination with GitHub Desktop for Windows.
Let’s say you want to make a change to a branch first and then do a Pull Request and then merge that back to the master branch. You simply create the branch in the UI of GitHub Desktop. Then make your code changes. Back in GitHub Desktop, do the commit. Then click to Publish it. Then go to Github in the browser and you can create a Pull Request for that and do the merging. I know this last description was very brief, so perhaps I should do a separate blog on it.