DEV Community

Cover image for Windows, Angular CLI, and NodeJS

Posted on

Windows, Angular CLI, and NodeJS

I recently had the honor of working with a neighbor beginning his development journey. He is taking a course through his employer and using a work computer with Windows installed.

Initially, I saw that he was using Git Bash ... mostly unsuccessfully. In particular, the Angular CLI was failing with command not found. He apparently had figured out some creative npx commands.

I wanted something simpler for him.

Knowing he had NodeJS installed, we set the path to the Angular CLI and made a custom shortcut to the NodeJS Command Prompt.

Setting the Path

We followed the rabbit hole and found the Angular CLI in the following location ...

Enter fullscreen mode Exit fullscreen mode

Then, we opened the Environment Variables and added this to the Path. This ensures that we are able to reference the CLI in the command prompt later.

Windows Environment Variables

Windows Environment Variables - New

Custom Shortbut

Then, we located the NodeJS Command Prompt shortcut ...

C:\Program Files\nodejs
Enter fullscreen mode Exit fullscreen mode

We then copied the shortcut and placed it on the desktop to make things a bit easier.

The biggest change we made to the shortcut was to set the "Start In" folder to the root of his projects folder ... we got to these settings by Right-Clicking and selecting Properties.

NodeJS Command Prompt Properties


This simple setup gave him much more flexibility without any hassles for Angular development using the CLI.

Discussion (1)

fashion86 profile image

Yeah, that's simple and very useful. Thanks