ng serve opens editor instead of loading local URL

Whenever I type ng serve or ng serve --open, it always opens an editor and doesn't open the project.

You can see this in the images below, this is the first image of command:

This editor opens after typing the command and pressing Enter:

This editor opens after typing the command and pressing enter


This is the terminal editor on the 'ng' alias. Uninstall it with:

sudo apt purge ng-common ng-latin

And then install Angular CLI (assuming you have npm installed) with

sudo npm install -g @angular/cli

If you don't have npm installed have a look here