Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why Do I have to run npm install everytime I create a new angular 2 project?

Everytime I make a new angular 2 project it says "node_modules appears empty, you may need to run `npm install"

like image 517
Hanan Ur Rehman Avatar asked Jul 17 '17 21:07

Hanan Ur Rehman


2 Answers

Dependencies

In your angular project, you have a file called package.json. this file is responsible for holding track of your projects dependencies.

When you run npm install, Node Package Manager, or npm for short, will download those dependencies and put them in node_modules folder.

like image 66
Hamid Asghari Avatar answered Nov 15 '22 22:11

Hamid Asghari


You need to run npm install to install the dependencies. May be refer to https://docs.npmjs.com/cli/install.

like image 30
RKG Avatar answered Nov 15 '22 22:11

RKG