can Package.json be in git ignore?

There are many changes in Package.json. Is it OK if I push this into git ignore?

Is not Ok put it on Git Ignore, this file controls the plugins u are using on your project.

If u use some lib that is not on package.json, when u clone your repo your project will not work.

1 Like

Pushing a package.json to .gitignore will mean no one will be able to recreate the project unless they add in their own (and assuming it matches if you’re using any of it’s variables within your code). If you ever pull the project fresh, you also won’t be able to run it without recreating the file.

There’s absolutely no reason to be worried about ‘a lot of changes’ to a package.json unless you find packages in there that you (or a colleague, or other coder on your project) didn’t add.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.