npm Basics


Below you will find a collection of tutorials teaching the basics of npm, the package manager.

Before You Start

These tutorials assume you understand the basics of using the terminal.


Why should I use npm?

Learn why you should use npm.

npm Glossary

Learn key terms used with npm.


Install Node and npm

Learn how to install Node and npm.

Check Node and npm version

node -v
npm -v

Create package.json file

npm init

Local Packages

Install package locally

npm install package-name

Run local package

npx package-name [options/arguments]

Update local package

npm update package-name

Uninstall local package

npm uninstall package-name

Global Packages

Install package globally

npm install -g package-name

List global packages

npm list -g --depth 0

Update global package

npm update -g package-name

Uninstall global package

npm uninstall -g package-name


Learn more about a command

npm help term

Using npm with Git

Learn how to use npm with Git.

Notice any errors? Have other questions or suggestions? Send your comments and questions to