Ng serve throws node_modules empty error appears

I was just starting to learn Angular 4, and as part of the learning process, I did the following:

Install Node.js (version 8).

Run this command npm install -g @angular/cli

created a new project through the CLI: ng new my-first-app

As soon as I ran this command:, ng serveI got an error message node_module, it seems empty, you may need to run "npm install". After running npm install, he installed several libraries, and now ng servebuilds and runs the project. I'm trying to understand why I need npm installand what it installed? not all prerequisites were set using this commandnpm install -g @angular/cli

+4
source share
3 answers

. (npm install -g @ angular/cli) angular/cli , , . , npm install npm i

+2

angular

ng new my-first-app

.

cd my-first-app

npm install

.

+7

npm install, node_modules, , npm install,

-1

Source: https://habr.com/ru/post/1685952/


All Articles