How to Install NPM Packages
Through both a video and written tutorial, you’ll learn the difference between npm install
and npm install <package>
, where packages go, all about dependencies, and how to search for and choose Node Package Manager packages.
Installing packages and dependencies in Node is one of the most important tasks we accomplish using the npm Command Line Interface (CLI). Before an application can be run, you need to install all existing dependencies recorded in the application's package.json file. You can also add new packages from npmjs.com as dependencies to the application by running npm install <package>
. You can install packages as a local dependency for an application, as a devDependency, or globally (making them accessible from anywhere on your system).
In this tutorial we'll:
- Identify the difference between
npm install
andnpm install <package>
- Explain where packages go once they are installed
- List different kinds of dependencies
- Describe how to search for and choose npm packages
Sign in with your Osio Labs account
to gain instant access to our entire library.