Set up a basic web development environment
A quick guide on which programs should be installed.
If you are new to Angular or web development generally, you may have trouble installing and configuring all the necessary programs. In this guide, we will go through all the steps to set up an optional development environment.
If you are developing on a Windows machine, make sure you use the Linux subsystem, as all commands are for Bash.

Install programs
The programs for the core of any web development environment are git and node.
Git
If you are using a modern Linux distribution that relies on Ubuntu or macOS, it is very like that git
is already installed. To test if git is already installed, run the command: git --version
.
If you are using Ubuntu or Debian distribution, you can install git
with apt-get install git
. For other installation methods, see the git download page.
Node
It may be essential to switch between node versions on the fly. Therefore, a classic installation with apt-get
is not a viable option.
To solve this problem, the Node Version Manager project can be used. NVM can be used to install multiple node versions and switch them on the fly. In addition, NVM provides a convenient script for installing the required scripts:
Troubleshooting on Linux
On Linux, after running the install script, if you get nvm: command not found
or see no feedback from your terminal after you type command -v nvm
, close your current terminal, open a new terminal, and try verifying again. Alternatively, you can run the following commands for the different shells on the command line:
bash: source ~/.bashrc
zsh: source ~/.zshrc
ksh: . ~/.profile
These should pick up the nvm
command.
Troubleshooting on macOS
Since OS X 10.9, /usr/bin/git
has been preset by Xcode command line tools, which means we can't properly detect if Git is installed or not. You need to manually install the Xcode command-line tools before running the install script. Otherwise, it'll fail. (see #1782)
If you get nvm: command not found
after running the install script, one of the following might be the reason:
- Since macOS 10.15, the default shell is
zsh
and nvm will look for.zshrc
to update, none is installed by default. Create one withtouch ~/.zshrc
and rerun the install script. - If you use bash, the previous default shell, your system may not have a
.bash_profile
file where the command is set up. So firstly, create one withtouch ~/.bash_profile
and rerun the install script. Then, runsource ~/.bash_profile
to pick up thenvm
command. - You have previously used
bash
, but you havezsh
installed. You need to add these lines manually add~/.zshrc
and run. ~/.zshrc
. - You might need to restart your terminal instance or run
. ~/.nvm/nvm.sh
. Restarting your terminal/opening a new tab/window, or running the source command will load the command and the new configuration. - If the above didn’t help, you might need to restart your terminal instance. Try opening a new tab/window in your terminal and retry.
If the above doesn’t fix the problem, you may try the following:
- If you use bash, it may be that your
.bash_profile
(or~/.profile
) does not source your~/.bashrc
properly. You could fix this by addingsource ~/<your_profile_file>
to it or follow the next step below. - Try adding the snippet from the install section that finds the correct nvm directory and loads nvm to your usual profile (
~/.bash_profile
,~/.zshrc
,~/.profile
, or~/.bashrc
). - For more information about this issue and possible workarounds, please refer here.