Node modules in Github repo


I am wondering: do we need to upload the entire node modules folder to the github repo? If no, and if we only upload our package.json, then what happens if the module would get deleted meanwhile?

You .gitignore node_modules folder and don’t upload them to the repo.

If package gets deleted Internet will break :worried: It’s not a joke. Happened earlier this year. Google “left-pad fiasco”.

Now npm has a protection so packages can’t be deleted easily.


Left-pad was the developer equivalent of 2016 killing off normal people’s heroes!