Setup Prerequisites
Preface
This tutorial runs you through the steps required to set up your development environment.
goals
Version Control System
We strongly recommend using a version control system.
- Linux
- MacOS
- Windows
Install the git package.
In our examples, we will use the APT package manager and also assume that you are using a Debian based distribution.
Adjust the examples to your distribution and package manager accordingly.
sudo apt-get update
sudo apt-get install git
Follow the instructions for MacOS to install.
See this gist if you are already using or planning to use the XCode Command Line Tools.
Follow the instructions on Git for Windows to install.
Integrated Development Environment (IDE)
We also strongly recommend you install and use an IDE.
Visual Studio Code (VSCode)
VSCode is an open-source and free to use IDE developed by Microsoft and a community of developers.
WebStorm
WebStorm is an IDE developed by JetBrains.
You can also try the WebStorm Early Access Program and use WebStorm for free.
NetBeans
NetBeans is an open-source and free to use IDE developed by a community of developers under the hood of the Apache Software Foundation.
Eclipse
Eclipse is an open-source and free to use IDE developed by a community of developers under the hood of the Eclipse Foundation.
Node Version Manager (NVM)
We also recommend that you use a node version manager like nvm when working on Unix-like operating systems such as Linux, FreeBSD, or MacOS.
For Microsoft Windows you can use nvm-windows instead.
- Linux
- MacOS
- Windows
Follow the official installation instructions to install nvm.
See also Troubleshooting Linux if you encounter any issues.
Follow the official installation instructions to install nvm.
See also Troubleshooting MacOS if you encounter any issues.
Follow the official installation instructions to install nvm-windows.
Node.js
Now is the perfect time to install Node.js.
Using nvm makes this step very easy, and one can choose between installed versions at all times.
We will install and use the latest long-term support release (lts).
- Linux
- MacOS
- Windows
nvm install lts
nvm use lts
You can use the following commands to manage Node.js versions:
- nvm ls to see the installed versions.
- nvm ls-remote to see which versions are available for installation.
- nvm install <version-id> to install a specific version.
- nvm use <version-id> to use a specific version.
nvm install lts
nvm use lts
You can use the following commands to manage Node.js versions:
- nvm ls to see the installed versions.
- nvm ls-remote to see which versions are available for installation.
- nvm install <version-id> to install a specific version.
- nvm use <version-id> to use a specific version.
nvm install lts
nvm use lts
You can use the following commands to manage Node.js versions:
- nvm list to see the installed versions.
- nvm list available to see which versions are available for installation.
- nvm install <version-id> to install a specific version.
- nvm use <version-id> to use a specific version.
Node Package Manager
Upgrade NPM (optional)
Next, you might want to upgrade npm to its latest version.
npm install --global npm@latest
Yarn (optional)
By default, npm will be provided for package management and package dependency management.
If you prefer yarn, follow the below steps to install it globally.
npm install --global yarn@latest
TypeScript (optional)
For some use cases, you might want to install TypeScript globally.
- npm
- yarn
npm install --global typescript@latest
yarn global add typescript@latest
Summary
achievements