M
M
Maxim Ivanov2017-06-18 12:52:14
Maven
Maxim Ivanov, 2017-06-18 12:52:14

How to use npm for continuous integration (CI)?

Good afternoon. At our work, the UI is written using Angular 4, TypeScript, we assemble it using webpack. But more precisely, the project itself is assembled using maven, since the system is written in Java, and maven uses frontend-plugin for UI .
The problem we have is this, since the build server is on a different machine, so npm install is launched first of all for the build (and as you know, webpack, angular and other dependencies are huge now). The corporate Internet is weak, and, accordingly, the build takes longer, while all dependencies are downloaded from online repositories, maven even downloads nodejs locally every time and this annoys me the most. After all, when there are problems with the network due to low Internet, the entire download is dull and you have no idea what is happening now when npm install hangs and does not go any further.
What do you advise to do? I know that node_modules cannot be added to git, so we have it added to gitignore, from here npm install is launched. But how do they deal with it all?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Konstantin Kitmanov, 2017-06-18
@k12th

Try yarn, it can cache already downloaded dependencies, and, accordingly, yarn install is much faster after the first time.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question