Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll

- 2x 2x
- 1.75x 1.75x
- 1.5x 1.5x
- 1.25x 1.25x
- 1.1x 1.1x
- 1x 1x
- 0.75x 0.75x
- 0.5x 0.5x
There are two ways to install an npm package. When a package is frequently used, it may be helpful to install it in a location where it is accessible to multiple projects. When a project relies on a package it's best to install the package in that project.
Terminal Commands
- Clear the screen
clear
npm Command Line Usage
-
Get help for a command
npm <command> -h
- e.g.
npm install -h
-
Installing a global package
-
npm install <package_name> -g
- e.g.
npm install http-server -g
-
-
Installing a local package
-
npm install <package_name>
- e.g.
npm install express
-
Documentation
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up-
JASON LEE
17,352 Points1 Answer
-
David Kayser
12,009 Points2 Answers
-
Sean Gibson
38,363 Points2 Answers
-
Katie Diamond
2,035 PointsWhere are the project files for this video? I don't see them in the Downloads folder. Do I need to upgrade?
Posted by Katie DiamondKatie Diamond
2,035 Points2 Answers
View all discussions for this video
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up