Languages

Angular init entire project after git clone

4 points
Asked by:
Root-ssh
6266

Today I made git pull of new project from gitlab repository.
I use Intellij IDEA to run app with package.json
The config file package.json start angular app with:

"start": "ng serve"

The angular application won't start and I see a lot of errors in console output.
How can I solve it? Is there a command I need to execute fresh after git pull of repo?

1 answers
4 points
Answered by:
Root-ssh
6266
  • This command always solve this problem:
npm install

After this command will be executed it will create node_modules with all libs.
If we want to see what npm is doing in the background (when app is large, then npm install can take quite time) we can use --verbose parameter and it will print all the stuff npm downloads.

npm install --verbose
  • We can start angular app from command line with:
ng serve
  • Explanation:

Every time after we clone fresh git repo we need to install all packages and dependencies we have configured for this project.

All the stuff will go to the directory:

node_modules

This directory with all libs shouldn't be added to repository.

Description from npm documentation:
This command installs a package, and any packages that it depends on.

link to npm-install doc - here

0 comments Add comment

Checkout latest findings & news:

Checkout latest questions:

Checkout latest wiki articles:

Hey 👋
Would you like to know what we do?
  • Dirask is a friendly IT community for learners, professionals and hobbyists to share their knowledge and help each other in extraordinary easy way.
  • We welcome everyone,
    no matter what the experience,
    no matter how basic the question is,
    this community will help you.
Rockstar community members
Thank you for great work 👍