Answer the question
In order to leave comments, you need to log in
What is the Nexus registry for npm packages used for?
Hi all
friends, can you just explain why npm packages need to be stored in the registry (like this) and what benefits does this promise for deploying or building applications?
have a nice weekend,
Vadim
Answer the question
In order to leave comments, you need to log in
Vadim
, and actually npm has nothing to do with it
, in general, there are quite a lot of benefits from the nexus:
- packages are cached "locally" (close to the developer), that is, the time to pump out dependencies decreases
- sometimes the official repository blunts , throws errors, or even lies, and the project you need to compile - in this case, cached versions will help out
- it's nice to have control over what we include in the project, with certain dances with a tambourine, you can get quite a lot of interesting information about your dependencies in terms of vulnerabilities and license agreements
- another non-obvious plus that sometimes solves: there are several different repositorieswhich your developers want to use, in this case, the devs do not need to change anything in the npm settings, and you just proxy additional repositories on the nexus side
- if your application is normally designed and it consists of separate modules and libraries, then you need to store them somewhere and exchange with your other developers (you won’t shove your packages with business logic into the official repository), in this case the nexus decides because, again, nothing changes on the developer’s side (they continue to just look into the nexus) and they calmly receive your packages
- sometimes there is such garbage (but rarely) when you kind of have the source code, but it’s kind of not in the official repository of the package, but you wantinstall it as a dependency, so you can store in the nexus not only packages produced by your devs. but also just 3rd party packages that need to be stored
somewhere, this is what immediately came to mind from practice,
roughly speaking, the nexus is such a good interface to packages that you can, for your part, quite flexibly configure and not pull npm-config at the same time on each developer's machine
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question