From the course: Learning Node.js

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

What is the package.json file?

What is the package.json file? - Node.js Tutorial

From the course: Learning Node.js

Start my 1-month free trial

What is the package.json file?

- [Instructor] We have our own project and our own custom files and third party packages from where we left off previously. But what if wanted to distribute our app or project or put it into a git repository? It wouldn't make sense to include all of the packages we depend on because they take up a lot of space and since there are hundreds, if not thousands, of files each package depends on, it takes a long time to transfer those. But then the developer, who just got our project, will have to manually install all of those packages. And, if your depending on a few dozen, it will take a lot of time to execute all of those npm install calls each time we download a new project or take in an update. To solve that, we can create a package.json file. Among other things, it stores a list of the packages you depend on in your project. That way, when using the npm command install, it will go through that list and install everything automatically. So to create a package.json file, let's go to our…

Contents