How to Install Global Packages

There are two ways to install npm packages: locally or globally. Choose which kind of installation to use based on how you want to use the package.

To download packages globally, use the command npm install -g <package>, e.g.:

npm install -g jshint

If you get an EACCES error, see this chapter about permissions.

Tip: Consider using npx to run packages globally, if you have npm 5.2 or greater installed.

          Found a typo? Let us know!

npm Services

Getting started

Private packages


Using npm

CLI commands

Configuring npm

View All On One Page