Choosing a Package Manager
So far, we have learned a bit about Node.js and its internal modules. We also started to write our own modules, but we have either avoided or worked around using third-party packages.
One of the big advantages of Node.js is that using other people’s code is actually quite easy. The path to doing so leads us directly to package managers. A package manager helps us to handle the life cycle of packages containing modules that can be used in Node.js.
In this chapter, we’ll learn how Node.js’s de facto standard package manager npm works. We will then go on to learn about other package managers, such as Yarn and pnpm. They all promise some advantages in terms of usability, performance, or reliability. We will take a deeper look at them to understand these advantages and who might benefit from using each of the different package managers. Finally, we’ll also look at alternatives.
This chapter will help you to use third-party...