BabelJS - Environment Setup



In this section, we will learn how to set up the environment for BabelJS.

To work with BabelJS we need following setup −

  • NodeJS
  • Npm
  • Babel-CLI
  • Babel-Preset
  • IDE for writing code

NodeJS

To check if nodejs is installed on your system, type node –v in the terminal. This will help you see the version of nodejs currently installed on your system.

Nodejs

If it does not print anything, install nodejs on your system. To install nodejs, go to the homepage https://nodejs.org/en/download/ of nodejs and install the package based on your OS.

The following screenshot shows the download page of nodejs −

Download

Based on your OS, install the required package. Once nodejs is installed, npm will also be installed along with it. To check if npm is installed or not, type npm –v in the terminal. It should display the version of the npm.

Command
Advertisements