Gatsby build but we have to press clear redeploy button

I have a project into github and i linked with netlify. My project is running but now if i push anything into the github so cache error. When i press clear and redeploy button from dropdown then it gets success. Before i never did it. It is automatically rebuilt

hi there,

give this guide a read through and see if it helps!

Yes every time i have to press cleae cache and deploy button whenever push the code into github. Please give me a suggestion it is very urgent

What is your suggestion how can i do it? It is not possible to press clear cache and redeploy option every time

did you follow the suggestions in the guide that i linked?

do confirm that you have tried all those things first, as those are almost certainly the solutions we would suggest.

Gitignore of Node_module, So I donot have node_module in github
only package.json is updated. so how can i upload node_module in netlify or I can’t understand. Or where is the step. Locally works

where is the steps? My project is now live, It works for 4 months very well but now it is having the problem

sandip, you should never upload the node_modules folder by including it in your git repo. a.) it is generally quite large and takes up a ton of space, b.) the whole point of having a package manager is that the package manager reads through your package.json file and downloads up to date, relevant packages and installs them. If i were to guess, when you say the app runs fine locally, is that for some reason your package.json is out of date or you are using very old versions of things that, when you upload your package.json get automatically updated to newer versions that are incompatible with each other.

i don’t think this is a netlify problem - i would recommend you take the time to understand how node, npm, and package managers work and the role the package.json has in creating a stable project. Unfortunately that is beyond the scope of these support forums, but if you have specific questions that are related to netlify, we can try to assist.