GitHub and the node_modules folder
You should not check external module files into GitHub. External modules is stored in your projects folder in the node_modules/ folder, this should be excluded from git.
The .gitignore file can be used to exclude files from git. Create a one in your projects root folder touch .gitignore
Add this entry into it:
node_modules/
Now after doing this you can add your project to git & GitHub:
git init
git add .
git commit -m 'initial commit'
No add a remote git repository and push your files to it. If you added the node_modules folder to git by mistake ask a mentor to help you to remove it.
Your project’s dependencies can be installed after a clean checkout from GitHub using the npm install command. This will download all the dependencies specified in your package.json file into the node_modules folder.