Step 1 Working with NPM
The NPM install command reads the package.json file to install the dependencies. To work with NPM, you must have NodeJS installed; if you do not already have it installed, you can install it from the NodeJS website. After running the NPM install command, you will find folder node_modules added in your project. This folder contains all the libraries installed using this command.
npm install igniteui-angular2
To run the application, execute the command below:
Step 2 Working with Yarn
NPM is one of the most popular package managers, but it has some shortcomings:
Nested dependencies cause a long file path on Windows.
NPM does only sequential installation, so one package must be completely installed before you can start installing the next one.
It can only install from the NPMSJS package and it does not have offline installation.
Yarn solves these problems. Yarn is a fast, reliable, and secure package manager that takes packages from npmjs or bower registry.
Like NPM, Yarn also reads package.json files of your project to install dependencies.
To work with Yarn, download the start project and open it in the terminal.
If you do not have Yarn installed on your machine, you must install it with the command below:
npm install –g yarn
Note: If you are using Apple’s Mac OS, you may receive permission errors when you try to install global packages with NPM. If this happens, try:
sudo npm install –g yarn
After installing Yarn, you can use it to install dependencies in your project. To install dependencies, run the command below:
yarn add igniteui-angular2
After successful installation, you will find a node_modules folder added in the project. To run the application, execute the command below:
If everything is correct, the above command should start the application and you will have a running application as shown below:
Step 3 Working with Dynamic Module Loaders