Appendix C. Using the npm package manager


This appendix is an overview of the tools we use to install Angular and its dependencies using the npm package manager.

For most of this book, we use Node.js for installing software. Node.js (or simply Node) isn’t just a framework or a library: it’s a JavaScript runtime environment as well. We use the Node runtime for running various utilities like npm or launching JavaScript code without a browser. We also use npm scripts to automate building, testing, and deploying Angular apps.

To get started, download and install the current version of Node.js from After installation is complete, open your terminal or command window and enter the following command:

node --version

This command should print the version of Node installed, for example, 10.3.0. Node comes with the package manager npm, which we use to install Angular and other packages from the npm registry located at This repository hosts Angular as well as more than 400,000 other JavaScript packages.

C.1. Specifying project dependencies in package.json

C.2. Semantic versioning

C.3. Yarn as an alternative to npm