Firstly What is a dependency, When working on a project there are some libraries you may want to Install Because they have been tested, In use and will make your development process faster.
you don't need to build everything from scratch.
So while working on a personal project that you started virtually everything, let's say you want to install a library that outputs names randomly and it exists in your favorite package manager.
Let's say the name of the library is random-names, you can easily install it by
npm install random-names
But this is not what we want to do, As a developer you may want to work on an ongoing project that is on Github, but mostly dependencies are not pushed to Github because this is not a good way of project maintenance.
Your package.json file has a section that records all the dependencies that you use.
To install all this so as to be able to run your program correctly if they need dependencies you can easily type
npm install
And you're good to go.
Your feedback is warmly welcomed
Thanks for reading!