- [Instructor] If you've ever built an application
with JavaScript, React, Angular, Node.js, or Express,
you've used the Package Manager to install dependencies.
This Package Manager is called NPM.
It comes pre-installed with Node.js
and we'll go over shortly, how to install it.
Dependencies are packages that are used
in all of your projects
and come with a package.json file,
which we'll explore once we're done installing NPM.
This file is the map of your project.
It tells who created it, the version,
and the package that needs to be installed.
So what is really a package or a module or a dependency?
First off, don't be intimidated by people
who use these terms.
They're nearly the same thing.
They're simply a file or multiple files
combined together to form a package
that represents a specific function.
If we go to NPMJS.com, we can search this directory
of packages for any function we like
to add to our project.
You want to add a router to your React application.
Search for router and there is a package for that
and in fact, there's multiple packages related to routers.
You want to add simple syntax for displaying dates
on your application.
You can do a search for dates
and then install the moment package.
There are a growing 700,000 packages in this directory
so most likely, if you think of something,
there's probably a package for that.
The idea behind having this package directory
and NPM is to build lightweight projects
that can be easily shared across development team
and install the dependencies or packages locally
on our machines when we use the project.
It allows to free our resources locally
and install only what we need versus carrying
this go tags with whoever we want
to share our projects with.