Skip to main content

Command Palette

Search for a command to run...

Why we don't need to upload Node Modules in Github

Published
•1 min read•View as Markdown
Why we don't need to upload Node Modules in Github
H

I am a curious and enthusiastic tech lover from India, currently pursuing my undergraduate studies. I enjoy exploring and discovering new things in the world of technology and am excited to share my findings with others.

Why do we need NPM

Npm is an open source collection of Modules. We use npm for 3 things :

1.Reuse our own code in other projects.

2.Use others code in our project.

3.Share our solutions in other developers projects.

Package Json

Package json is a JSON file which contains the dependencies of our projects.

When we clone some repository from github we don't need to install Node modules with it. Rather repo have a Package JSON file. And when we command NPM install node installs all npm modules that are required for the project.

So we don't need to upload Node Modules when we upload our code in GitHub. It makes our work easier by creating JSON file and when we clone it we can get the required dependancies.

Summary

So we learnt that we don't have to upload node modules in github and Package Json file contains the dependency required for our project.

More from this blog

Npm , Package Json

6 posts