From the course: Node.js: Deploying Applications

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Packaging choices

Packaging choices - Node.js Tutorial

From the course: Node.js: Deploying Applications

Start my 1-month free trial

Packaging choices

- [Instructor] NPM is the default package manager for Node. It works well, pulls in needed libraries, and operates at both the user and system level as needed. Yarn is a new Java Script package manager built by, among other folks, Facebook and Google. It was created to overcome some perceived shortcomings in NPM, many of them related to deployment pipelines. So, what were the downsides of NPM? First, installation is slow. If you're building a serious application, spending several minutes pulling in modules every time you make a change, can really slow down the build process, quite a bit, especially if you do it on each release to make sure you've got exactly the right libraries. Next, NPM is often happy to give you different versions of downstream libraries for each build, which can cause inconsistencies in the behavior of the resulting application. NPM Shrink Wrap helps out with this and will take a look at it, but Yarn takes a different approach. Finally, there are security concerns…

Contents