More Complexity

We have some issues with our WordPress presentation but it’s okay for now. While we wait to figure out how that works, we want to get into something still more complex, Node.js on SharePoint.

Previously we mentioned that we’re a SharePoint shop. We get all the SharePoint we need for $5 per user per month. We have three users so that about $200/year and that gives us space to store all the content we expect to need.

But SharePoint is just a platform and why not throw a couple of rocks at it and see what breaks.

The first step in that process is Visual Studio Code, Microsoft’s free development platform. I’ve downloaded it from here:

https://code.visualstudio.com/download

During the install, it wanted me to connect to GitHub. Now I already had a GitHub login so I used that and now it looks like this:

I’m going to go ahead and watch this tutorial. The link takes yo uto this guys and he’s super-helpful. I’ve seen this once but I’ve forgotten it all… be right back.

That was a pretty time sink. I spent at least 45 minutes on it and all I got was this:

I created a folder in a folder to start in and called them \02_VSCode\01_251001\ so welcome to my head.

I also created a second sub-folder there and, together they look like this:

New\Select Folder

View | Command Pallet

View | Terminal

File | New File: name and save.

Run\F5

Using the above, I added some console.log commands and tried to run it. I get this error:

I confirm no Node by running node -v from the PowerShell prompt in my VSCode terminal.

Copilot says to install Node from here: Node.js — Run JavaScript Everywhere. The subtle reminder is to make sure it lands in your PATH so that the editor can find it at runtime. The install also wants to install some other native tools that sound delicious.

The installation take a little longer than you might expect. And then, this is less than convenient:

This thing drops into PowerShell and runs for quite some time. It gave me more than zero errors and ended up hanging. How long do you let something like this sit? I don’t know; it’s late Friday. I think I’ll just let it sit there.

So, while that hangs, I reopen VSCode and it lands back on my little .js file and I select Run | Without Debugging and it does, in fact, write my strings to my terminal. A win.

When it gets to the Python part, it shows you how to add the Python extension that support Python IntelliSense. IT’s not exactly like the guys says but I found it pretty easy:

That also takes longer than you might expect but I can go back to my first python page and the IntelliSense if working great. Another win.

While that was going on, the PowerShell session picked back up, sprayed some text on screen and then killed itself so that’s a third win.

Next it demonstrates how to drag an html file into your work folder and add Microsoft’s Live Preview extension so you can spawn web pages on the fly:

That takes just a moment. Then you can preview your .html pages in the VSCode workspace.

Overall, I’d give the video a solid C mostly because it seems to be outdated. The biggest hurdle is the Node.js binary. That’ll take a few minutes so I’m parking for now. More to follow.