Closed Steve-Mcl closed 3 years ago
Hi, typically you should exclude node_modules from git.
node_modules
When the user installs your node, npm reads the package.json file and the necessary modules get download - but only if required.
npm
package.json
e.g. supposed the user already has fetch installed - npm will not download it again. however, as it is in your src, it will always be downloaded.
fetch
Worse still, if one of those packages you have inside node_modules has a serious security breach, the user is stuck with your version (kinda)
Unless you have intentionally done this, I would personally recommend excluding node_modules (add to git ignore) and push an update to git/npm
Some help in case you need it (ignore me otherwise)...
touch .gitignore && echo "node_modules/" >> .gitignore && git rm -r --cached node_modules ; git status
.gitignore
node_modules/
git rm -r --cached node_modules
git status
Hi, typically you should exclude
node_modules
from git.When the user installs your node,
npm
reads thepackage.json
file and the necessary modules get download - but only if required.e.g. supposed the user already has
fetch
installed - npm will not download it again. however, as it is in your src, it will always be downloaded.Worse still, if one of those packages you have inside node_modules has a serious security breach, the user is stuck with your version (kinda)
Unless you have intentionally done this, I would personally recommend excluding
node_modules
(add to git ignore) and push an update to git/npmSome help in case you need it (ignore me otherwise)...
touch .gitignore && echo "node_modules/" >> .gitignore && git rm -r --cached node_modules ; git status
.gitignore
add the linenode_modules/
, save.git rm -r --cached node_modules
# (to remove node_modules from tracking)git status